updateable query

Results 1 to 4 of 4

Thread: updateable query

  1. #1
    Richard Pauer Guest

    Default updateable query

    I have tried to update the database by using an insert in to query however i am getitng this error message and i don&#039;t know why can someone please help..<BR><BR>sql_insert = "INSERT INTO users(" &_ <BR>"FirstName," &_ <BR>"Surname," &_ <BR>"Address1," &_ <BR>"Address2," &_ <BR>"Address3," &_ <BR>"County," &_ <BR>"Country," &_ <BR>"phoneno," &_ <BR>"email," &_ <BR>"username," &_ <BR>"password," &_ <BR>"repassword)"&_ <BR>"Values(" &_ <BR>"&#039;"& FirstName &"&#039;,"&_ <BR>"&#039;"& Surname &"&#039;,"&_ <BR>"&#039;"& Address1 &"&#039;,"&_ <BR>"&#039;"& Address2 &"&#039;,"&_ <BR>"&#039;"& Address3 &"&#039;,"&_ <BR>"&#039;"& County &"&#039;,"&_ <BR>"&#039;"& Country &"&#039;,"&_ <BR>"&#039;"& phoneno &"&#039;,"&_ <BR>"&#039;"& email &"&#039;,"&_ <BR>"&#039;"& username &"&#039;,"&_ <BR>"&#039;"& password &"&#039;,"&_ <BR>"&#039;"& repassword&"&#039;)" <BR><BR>Set project1_con = Server.CreateObject("ADODB.Connection")<BR> project1_con.Open "project1","", ""<BR> project1_con.Execute sql_insert<BR><BR> Set project1_con = Nothing<BR> Response.write"&#060;p&#062; Thankyou for signing up. Your personal details have been added to our <BR><BR>database !&#060;/p&#062;"<BR>%&#062;<BR><BR>and i am getting this error<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>/c9803635/temp/register.asp, line 57 <BR>

  2. #2
    NPKumar Guest

    Default RE: updateable query

    Try with Project1_con.open Project1 &#039;Project1 should be your connection string.

  3. #3
    peterjl@austec.net.au Guest

    Default RE: updateable query

    When you open a connection object with default params, it gets the default mode and this often allows only read permission when you use the Execute method to execute SQL commands. That means that you can run Select commands, but may prevent you from Inserts, Updates, Deletes.<BR><BR>To use the Ececute method for writes, you may need to look at the Mode and Attributes properties of the connection. You need to set these before you open the connection:<BR><BR>Set project1_con = Server.CreateObject("ADODB.Connection")<BR>project 1_con.Mode = adModeWrite<BR>project1_con.Open "project1","", ""<BR><BR>Alternatively what I normally do is to use the default Connection object to open a recordset with appropriate CursorType and LockType, and use the recordset&#039;s AddNew, Update, and Delete methods to edit the recordset:<BR><BR>Set Rs = Server.CreateObject("ADODB.RecordSet")<BR>Rs.Open Query, project1_con, adOpenKeyset, adLockOptimistic<BR>Rs.Addnew<BR>&#039; Do the edits<BR>Rs.Update<BR><BR>You should lookup the details of ado Connection and Recordset Objects on the MSDN, msdn.microsoft.com

  4. #4
    Join Date
    Dec 1969

    Default RE: updateable query

    One of the first things you should do when you get this error is to check the permissions on the database file itself. You should ensure that IUSR_(machinename) has write and read permissions on the database. If they do not, you will always get this error. After checking the DB itself, work you way back up and check the permissions on all of the folders/subfolders that the db is stored in.<BR><BR>mj

Posting Permissions

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