Solved

msado15 Conn TimeOut (increase timeout value)

Posted on 2004-07-30
1
514 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
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 viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

808 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