Locking Access Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Awadh Kishore
    New Member
    • Apr 2009
    • 2

    Locking Access Database

    I have a table where all serial no. are kept. Suppose one of them is Bill_serial_no. when two users are simalteneusly making bills the Bill no is same for both the bills in the bill table, but the Bill_serial_no gets incremented by 2. I have tried the following code :

    dim cn as ADODB.Connectio n
    dim rs as ADODB.Recordset

    sqtxt="select * from SerialTable"
    set rs=New ADODB.RecordSet
    With rs
    .CursorType = adOpenDynamic
    .LockType = adLockPessimist ic
    .ActiveConnecti on = cn
    .Open sqtxt
    End With

    Please Help Me.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    is SELECT the only SQL command that you are using ?

    Comment

    • Awadh Kishore
      New Member
      • Apr 2009
      • 2

      #3
      Originally posted by debasisdas
      is SELECT the only SQL command that you are using ?
      Yes it is. If there is any thing else that could be used then please suggest me.
      thanking you.

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Post the Saving Part of your Code..

        Regards
        Veena

        Comment

        Working...