Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AlfieNoakes
Starting Member
14 Posts |
Posted - 2003-07-09 : 05:11:45
|
Hi.I'm working on fixing some awful VB Coding, which stupidly uses "On Error Resume Next".What happens is this: A recordset is opened (using adOpenKeyset, adLockOptimistic). However, the original progammer (not me) doesn't check to see if it timed out, and uses "do until RecordSet.EOF".How can I simulate a timeout on a recordset in VB? I've tried things like opening a query on the same table in SQL Server, then trying to open an identical recordset from VB, but that doesn't seem to have the required effect.Thanking you in advance,Alfie |
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2003-07-09 : 09:18:28
|
quote: How can I simulate a timeout on a recordset in VB?
You mean to say you would like to artificially create a timeout situation to watch what your code does?Read up on the CommandTimeout property of the ADO Connection object. Set it to a very short time period and you can probably create intermittent timeouts.Jonathan{0} |
 |
|
|
|
|