Solved

msado15 Conn TimeOut (increase timeout value)

Posted on 2004-07-30
1
507 Views
Last Modified: 2009-07-29
I open a data connection using this:

CoInitialize(NULL);
conn.CreateInstance(__uuidof(ADODB::Connection));
rs.CreateInstance(__uuidof(ADODB::Recordset));
rsLoop.CreateInstance(__uuidof(ADODB::Recordset));
conn->Open("Driver={SQL Server};SERVER=X.X.X.X;UID=**;PWD=**;DATABASE=**", "**", "**",-1);

When i have a recordset who return over 2,000 row, i got a time out.
How can i increase the dataconn timeout value?
0
Comment
Question by:mammouth
1 Comment
 
LVL 16

Accepted Solution

by:
nonubik earned 125 total points
ID: 11678849
Call
>conn->ConnectionTimeout = lVal;
before
>conn->Open(...)

'lVal' is a Long value that indicates, in seconds, how long to wait for the connection to open. Default is 15.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now