Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL timeouts in VB6

Posted on 2002-03-20
3
Medium Priority
?
240 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 800 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

609 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