Results 1 to 23 of 23

Thread: [RESOLVED] VB6 with Access 97 for multiuser system

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    8

    Resolved [RESOLVED] VB6 with Access 97 for multiuser system

    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:
    vb Code:
    1. On Error GoTo Err_ErrorHandler
    2.    
    3.     Dim rs As dao.Recordset
    4.        
    5.     If theSerial = "" Then Exit Sub
    6.        
    7.     Set rs = db.OpenRecordset("Results", dbOpenDynaset, dbOptimistic)
    8.     rs.AddNew
    9.     rs("DateTime") = Now
    10.     rs("Serial") = theSerial
    11.     rs("ProductID") = prod.prodID
    12.     rs("Passed") = passed
    13.     rs("Comments") = comments
    14.     rs("OperatorID") = MainWindow.GetUserId
    15.     rs("Firmware") = BaseName(prod.firmware)
    16.     rs.Update
    17.     rs.Close
    18.  
    19.    
    20. Exit_ErrorHandler:
    21.     ' de-initialise our object variables
    22.     Set rs = Nothing
    23.     Exit Sub
    24.    
    25. Err_ErrorHandler:
    26.     ' display error message and error number
    27.     MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
    28.     Resume Exit_ErrorHandler
    Am I using the correct connection mothods (i.e DAO) for a multiuser system? Is there a better option?

    Can please someone give me some hints and I am completely new to this topic?

    Thanks in advance
    Last edited by Hack; Apr 13th, 2007 at 07:36 AM. Reason: Added VB Highlight Tags

Posting Permissions

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



Click Here to Expand Forum to Full Width