If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Locking records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-04, 10:03
smasanam smasanam is offline
Registered User
 
Join Date: Feb 2004
Location: Rhode Island
Posts: 69
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
Reply With Quote
  #2 (permalink)  
Old 05-21-04, 11:10
SCIROCCO SCIROCCO is offline
Registered User
 
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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On