[Microsoft][ODBC Microsoft Access Driver] Cannot u

Results 1 to 2 of 2

Thread: [Microsoft][ODBC Microsoft Access Driver] Cannot u

  1. #1
    Join Date
    Dec 1969

    Default [Microsoft][ODBC Microsoft Access Driver] Cannot u

    I am trying to insert a record into a data base: <BR>Here is a sample of the code:<BR>&#060;%<BR>p_quoteid = request("id")<BR>p_invitationitem = request("invitationitem")<BR>set ordersDB = Server.CreateObject("ADODB.Connection")<BR>ordersD B.Open "invita13.data"<BR>set quoteSet = Server.CreateObject("ADODB.Recordset")<BR>quoteSet .Open "quotes", ordersDB, adOpenStatic, adCmdTable<BR>quoteSet.AddNew<BR>quoteSet("ID") = p_quoteid<BR>quoteSet("invitation_item") = p_invitationitem<BR>quoteSet.Update &#060;---- Line 18<BR>quoteSet.Close<BR>set quoteSet = Nothing<BR>ordersDB.Close<BR>set ordersDB = Nothing<BR>%&#062;<BR><BR>When I try this, I get the following error message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. <BR>/testasp/updatedb.asp, line 18<BR><BR>The database is in MS ACCESS and is not write protected at all.<BR><BR>Thanks for any help.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: [Microsoft][ODBC Microsoft Access Driver] Cann

    In your connection string you are giving the option to &#039adOpenStatic&#039. I bet that&#039s your problem. That (as I recall) is read only mode. Nothing else looks wrong with your code.<BR><BR>Hope that helps.

Posting Permissions

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