Access 97 DB Connection Blues

Results 1 to 3 of 3

Thread: Access 97 DB Connection Blues

  1. #1
    Manesh Guest

    Default Access 97 DB Connection Blues

    Firstly, all my vbscript code as well as the Access 97 database is sitting on a server. I have created a a system DSN on the server. The p.c. that i&#039m working on is seeing the connection. The problem comes in whenever i try to do things like insert, update and delete records from the database. I can however do normal select statements.<BR><BR>The following is my ADO connection statement as well as the error message i&#039m getting. <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Operation must use an updatable query. <BR><BR>/addvideo.asp, line 41 <BR><BR>Dim DB_CONNECTIONSTRING<BR>Dim objRecordset<BR>DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &_<BR> ("c:inetpubwwwrootectbtestdatabaseectb.mdb") & ";" <BR> <BR>Set EditConn = Server.CreateObject("ADODB.Connection")<BR> EditConn.ConnectionString = DB_CONNECTIONSTRING<BR> EditConn.Open<BR>Set Cmd = Server.CreateObject("ADODB.Command")<BR> Cmd.ActiveConnection = EditConn<BR> Cmd.CommandText = "INSERT INTO Videos " _ <BR> & "(Title,Author,DatePurchased,DatePublished,Descrip tion,Province,"_<BR> & "Region,Stock,Reorder,Copyright,PhysicalLocati on)" _<BR> & " VALUES (&#039"&fTitle&"&#039,&#039"&fAuthor&"&#039,&#039" &fDatePurch&"&#039,&#039"&fDatePub&"&#039,&#039"&f Description&"&#039,&#039"&fProvince&"&#039,&#039"& fRegion&"&#039,&#039"&fStock&"&#039,&#039"&fReorde r&"&#039,&#039"&fCopyright&"&#039,&#039"&fPhysical Location&"&#039)"<BR> Cmd.Execute<BR> EditConn.Close<BR><BR>If there is anyone out there that can help me, i would appreciate it.<BR><BR>Regards<BR><BR>Manesh

  2. #2
    Jason Buck Guest

    Default RE: Access 97 DB Connection Blues

    The problem lies with your JOINS. If you create this query just in your access database you will notice that there is no little star * on the last line. The query ends with your last recordset. This means that the query is not updateable.<BR><BR>What you need to do is play with the JOIN Properties. Basically you want to Select All Records from the main table and only those which are equal to the records in the main table from the sub table.<BR><BR>I hope that I have explain this clearly.<BR>If not, feel free to contact me.<BR><BR>Respectfully,<BR><BR>Jason<BR>webmaster

  3. #3
    Jason Buck Guest

    Default RE: Access 97 DB Connection Blues

    Here are some links that might help you:<BR><BR><BR><BR><BR><BR>ht tp://<BR><BR>Respectfully,<BR><BR>Jason<BR>webmas

Posting Permissions

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