Solved

msado15 Conn TimeOut (increase timeout value)

Posted on 2004-07-30
1
504 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

771 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

10 Experts available now in Live!

Get 1:1 Help Now