Query takes 0 seconds in Query Analyzer, times out in VB 
Author Message
 Query takes 0 seconds in Query Analyzer, times out in VB

I have an update statement that gives me a time out error in VB, but not
when I run it in Query Analyzer.  I put in code to write the sql statement
to a text file right before the execute line, so I have the exact query.  I
open Query Analyzer, log in using the same credentials the VB app is using,
set context to the same database the VB app is using, and run the query.  It
takes 0 seconds to run in Query Analyzer, as I would expect.

I'm using that same connection object for several more update statements.
If I comment out the one in question, they all run fine.  If I uncomment it,
it times out.

I've no clue.



Sat, 24 Jul 2004 01:14:01 GMT  
 Query takes 0 seconds in Query Analyzer, times out in VB
Nevermind.  I'm not paying attention.

I was calling this routine from a routine which was locking the record I was
trying to update.  I moved the call to this routine down to after the lock
is released, and it works fine.



Sat, 24 Jul 2004 01:35:07 GMT  
 Query takes 0 seconds in Query Analyzer, times out in VB
Glad you found the resolution to your problem!

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.



Sat, 24 Jul 2004 02:10:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB Query vs SQL Query Analyzer Speed?

2. MSSQL Query Analyzer in VB?

3. Saving the Query Analyzer resultset as a text file through VB

4. ADO recordset -- slow create in VB vs Query Analyzer

5. Different return values when using Query Analyzer and VB code

6. how can I build 2 queries in 1 query(VB SQL query)

7. VB/Access queries taking forever...

8. Help : SQL Query Analyzer Column Setting

9. Run DTS package with Query Analyzer / Trigger

10. Data Type Mismatch Error - works on Query Analyzer

11. Query Analyzer OCX/DLL for TSQL???

12. ? - Text Output like Query Analyzer

 

 
Powered by phpBB® Forum Software