SQL Insert into Database Error

Results 1 to 2 of 2

Thread: SQL Insert into Database Error

  1. #1
    Join Date
    Dec 1969

    Default SQL Insert into Database Error

    Hello all,<BR> <BR>I am trying to put a message forum on a site I am building and needless to say I have run into problems. These problems only arose when I placed the forum on a host server - it worked perfectly on PWS.<BR> <BR>On the main page the forum has a form which passes four values (Name, E-mail address, title and body) to the page Put.asp. In Put.asp it attempts to insert these values into my Access database. The code for this page is:<BR> <BR>&#060;!--#include file="tools.asp"--&#062;<BR><BR>&#060;%response.buffer = true%&#062;<BR><BR>&#060;%<BR><BR>If Request("Submit.X") &#060;&#062; "" Then<BR><BR>OpenDB con, "Bulletin"<BR><BR>SQL = "INSERT INTO tblBulletin (fldName, fldEmail, fldReply, fldTitle, fldBody, fldIP, fldDate, fldTime) VALUES (&#039" & _<BR><BR>Request.Form("Name") & "&#039,&#039" & _<BR><BR>Request.Form("Email") & "&#039,0,&#039" & _<BR><BR>InsertAp(Request.Form("Title")) & "&#039,&#039" & _<BR><BR>InsertAp(Request.Form("Body")) & "&#039,&#039" & _<BR><BR>request.ServerVariables("REMOTE_ADDR") & "&#039,#" & _<BR><BR>Date & "#,#" & _<BR><BR>Time & "#)"<BR><BR><BR>con.Execute(SQL)<BR><BR>response.c ookies("gloverr").Expires = #01/01/2002#<BR><BR>response.cookies("gloverr")("Name")= Request("Name")<BR><BR>response.cookies("gloverr") ("Email")= Request("Email")<BR><BR>response.redirect "default.asp"<BR><BR>End If<BR><BR>%&#062;<BR><BR>And when I try to insert a new message in the forum I am getting the following error returned:<BR> <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. <BR><BR>/bulletin/put.asp, line 15<BR><BR>Does anyone have any idea why this is happening. <BR><BR>Many thanks for all your help!<BR><BR>Yours etc etc<BR><BR>Ross<BR><BR>Dublin, Ireland<BR><BR>rossglover@eircom.net<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Insert into Database Error

    Ask your provider to set the permission for guest internet account to "write". should work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts