Solved

SQL timeouts in VB6

Posted on 2002-03-20
3
233 Views
Last Modified: 2010-05-02
Hello,
I want to change the default timeouts for SQL 7.

My choices are:  

1. Change the connection string

2. Change it inside of VB6
I use ADODB connection objects to connect to the database.

I've tried doing a command like gcnn.CommandTimeout = 120, but it always seem to timeout after 30 seconds (the default)

Any ideas?

Malcolm

0
Comment
Question by:mrtrevena
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
trkcorp earned 200 total points
ID: 6884633
Hmmm, strange. The gcnn.CommandTimeout = 120 (I assume this is your connection object) should work for you, are you sure it is in effect when you execute your query?  Try:

dim lTO as long
lTO = gcnn.CommandTimeout

just before you run your query and see that it is really set to 120...
You are aware that a Command object has its own CommandTimeout property and is not affected by the connection's setting?
0
 

Author Comment

by:mrtrevena
ID: 6884658
Hey,
Good call ont he command object timeout.  

That solved the problem!

I was having one of the crap days when you get stuck in lots and lots of meetings and constantly putting out fires.  

Nice to have an annoying problem solved by someone else.

Thanks alot!

Malcolm
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6884676
You're welcome!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question