Solved

SQL timeouts in VB6

Posted on 2002-03-20
3
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

728 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