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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting problem connecting with SQL Server

Status
Not open for further replies.

ayanroy

Programmer
Oct 20, 2002
22
EU
Hi all,

While connecting my asp page with SQL Server, I am getting following error:-
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Timeout expired

My Connection String is :-
Provider=SQLOLEDB.1;SERVER=MYSERVER;DATABASE=Northwind;User ID=sa;PWD=;

I am stuck here. Kindly provide any solution..

Thanks.

Ayan Kumar Roy
India
 
The default SQL query timeout for ASP is 90 seconds. So either you have a large query that just takes time or you may have an endless loop.

If you open IIS Admin, select your web site and go to properties. Select the Home Directory tab and click on the Configuration button. The second tab; app
options has a value for ASP timeout. This value is in seconds and is probably set to 90. Up this value to give your query more time to finish.

Or give more details as to what you are trying to do and getting this error...

-DNG
 
Sorry, buddy.

The problem still remains unsolved.

I want to connect my ASP page to a SQL server which is in my Local Area Network. The ASP script will fetch the data from a specified database table & display the data in the page.

Ayan Kumar Roy
India
 
could you show us your code...and the error you are receiving...

-DNG
 
Is your connections string really this: Provider=SQLOLEDB.1;SERVER=MYSERVER;DATABASE=Northwind;User ID=sa;PWD=;

The reason I ask is that it looks like you are trying to connect to the "Northwind" database which is a microsoft sample/example database that you DBA might have removed. Also it looks like the name of the machine is MYSERVER and I kind of doubt that the machine really has that name. Also the password for the sa account is almost never actually empty anymore... I think SQL Server 7 was the last one that had a blank password by default on the sa account and that newever versions you have to go through some hoops to get a blank password on that account... so most likely it has a password that you need .... or go into the Enterprise manager and create another account and use it instead.

Also you might find this helpful:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top