ASP and SQL error (very easy)

Results 1 to 2 of 2

Thread: ASP and SQL error (very easy)

  1. #1
    FunctionRookie Guest

    Default ASP and SQL error (very easy)

    I know its kind of crossposting, but Im desperate...<BR><BR>I am executing a simple update query. 2 fields! Here is my code:<BR><BR>set conn = server.createobject("ADODB.connection")<BR>connstr ing = "Driver={Microsoft Access Driver (*.mdb)};" &_<BR> "DBQ=" & server.MapPath("gez.mdb")<BR><BR> <BR>conn.Open connstring<BR><BR>stmt = "INSERT INTO mock (fname, lname) " & _<BR> "VALUES (" & _<BR> "&#039;" & fname & "&#039;, " & _<BR> "&#039;" & lname & "&#039;" & _<BR> ")"<BR>conn.Execute stmt, , adCmdText<BR><BR>Response.Write "&#060;h1&#062;Youve registered successfully.&#060;/h1&#062;"<BR><BR>And I error with one of these:<BR>[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.<BR><BR>I also attempted to add a record using the AddNew method, and was met with an error that read basically that the DB was readonly. <BR><BR>Can anyone please tell me where I screwed up? Thank you

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP and SQL error (very easy)

    sounds like your permissions are set wrong. Make sure database is set to read,write,update,delete not read only. If your site is on a hosted service you will need to contact them to set the permissions.

Posting Permissions

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