Results 1 to 2 of 2

Thread: Locking records

  1. #1
    Join Date
    Feb 2004
    Location
    Rhode Island
    Posts
    69

    Unanswered: Locking records

    Hello,

    I am running a real time system and the VB program tries to update a record and fails due to some other process locks that record(MS SQL Server replication process)

    The VB Program uses ADO objects and it fails when it tries to open a recordset using
    rs.open (SQL, Connection, Type, LockOptimistic)

    IS there any way I can force the program to wait until rs.open executes.
    The program not supposed to jump to the error trapping

    thanks in advance
    Masanam

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Change the timeout value for your connection object i.e.

    cn.Properties("Connect Timeout").Value = TIMEOUT_CONNECT
    cn.Properties("General Timeout").Value = TIMEOUT_COMMAND
    cn.ConnectionTimeout = TIMEOUT_CONNECT
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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