Results 1 to 2 of 2

Thread: Primary key problem!!!!!!!!! urgent....

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 1999
    Posts
    52

    Post

    hi,

    I've created a counter table (NextAvailID), and when someone wants to insert a record into the "main" table, I want to read the counter table (NextAvailID), increment the value by 1 and then update the counter table (NextAvailID). This will give me the next available primary ID to insert into my "main" table.

    The problem is, I need SPECIFICS (like actual ADO commands) on how to read and update this "counter" table so no other user can even read this "counter" table until it is updated with the incremented value.

    can any1 help me out!!!!!!!!!! its urgent...
    kandan
    E-mail: [email protected]
    ICQ: 52774533

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266

    Post

    Try the following be opening a recordset on the table.

    MyRecordset.open "NextAvailID",connection object,adoopenkeyset,adlockpessimistic,adcmdtable

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