Solved

msado15 Conn TimeOut (increase timeout value)

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

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

Suggested Solutions

Title # Comments Views Activity
FMX enumerated colours 2 156
C++ error cannot convert from std::string to const char * 6 367
sorting efficency of sorting algorithm 30 151
Header of docx file 17 145
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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…

739 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