Hi Everyone,
This is not a joke. I know we are in the year 2007 and what I am going to talk about is compeletly obsolete.
Here is my scenario.
My boss wants me to write a VB6 application that saves and retreives data from an Access 97 database for approx 6 - 7 users.
MY have managed to write it. OK....
But my problem is that I am having too much records and table locks (like error 3262 Table in use and error 3008) when I save data to a table.
This is the code I am using to insert a new record:Am I using the correct connection mothods (i.e DAO) for a multiuser system? Is there a better option?vb Code:
On Error GoTo Err_ErrorHandler Dim rs As dao.Recordset If theSerial = "" Then Exit Sub Set rs = db.OpenRecordset("Results", dbOpenDynaset, dbOptimistic) rs.AddNew rs("DateTime") = Now rs("Serial") = theSerial rs("ProductID") = prod.prodID rs("Passed") = passed rs("Comments") = comments rs("OperatorID") = MainWindow.GetUserId rs("Firmware") = BaseName(prod.firmware) rs.Update rs.Close Exit_ErrorHandler: ' de-initialise our object variables Set rs = Nothing Exit Sub Err_ErrorHandler: ' display error message and error number MsgBox Err.Description, vbExclamation, "Error #" & Err.Number Resume Exit_ErrorHandler
Can please someone give me some hints and I am completely new to this topic?
Thanks in advance




Reply With Quote