Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: [Microsoft][ODBC SQL Server Driver]Timeout expired

Status
Not open for further replies.

cplsplsprogrammer

Programmer
Joined
Apr 18, 2005
Messages
42
Location
US
Hello All,

I wrote an application in C++ using COM Objects to connect to database to insert data into a SQL server Database. I works fine if I run the application on Windows XP machine but the client machine is an NT 4.0 machine and when I run the application I get an error message
" [Microsoft][ODBC SQL Server Driver]Timeout expired ".

Can anyone please tell me if I have to change any server setting.

Thanks,

SQL Newbie
 
Do you know if you are getting a connection or is it only timing out when you execute the command?

It shouldn't be a server connction issue as much as a client network issue is my guess, and the default odbc command timeout is 30seconds. So unless you expect to have your command run over the 30seconds you shouldsn't have any issues there.

You might need to make sure that you have the latest ODBC drivers for sqlserver installed on your system.

I think you should be able to get them via an install of ADO.. Easy way to download is go to microsoft.com/data and follow the links to the the latest Mdac.exe

HTH


ROb
 
Hi Rob,

Thank you for your answer. I got my problem fixed. My sql server default timeout is set to 15 seconds so I increased the timeout to 60 seconds in my connection string and it worked fine.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top