• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

Microsoft OLE DB.....Timeout expired -- HELP !!!!

Hi expert!

i've windows 2k advanced server as a Web Server with 2 network cards (external & internal ip), 'external' is linked to the internet and the 'internal' is link to my SQLserver with 192.168.10.x. the problem is when i make connection to SQL via simple ASP command by calling....

    ....
    ....
    Set oRs = Server.CreateObject("ADODB.Recordset")
    Set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open session("MyConnectionString")
    ....
    ....


...then, the web page always raised an error like below...


Microsoft OLE DB Provider for SQL Server error '80004005'

Timeout expired

/myvirtual/myfile.asp, line xx


...the GLOBAL.ASA is so simple like this....

....
....
session("MyConnectionString") = "Provider=SQLOLEDB;Data Source=SQLSERVERNAME;Initial Catalog=MYDB;User ID=staff01;Password=staff01"
....
....

any idea?

I guess...may the problem will came from the routing table (both 'internal', 'external'), because when i disable the 'external' network card it can be establish the SQL connection properly (no so sure am i right???)

you will get 100 points from me for working solution....


many thank!
Tony
0
indigosmx
Asked:
indigosmx
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Try replacing the
Data Source=SQLSERVERNAME
by
Data Source=<internal IP address>

CHeers
0
 
SvenTech Lead Web-DevelopmentCommented:
Normally a connection string to SQL looks like:

driver={SQL Server};server=[192.168.0.1];uid=[UserID];pwd=[Password];database=[DBName]

Replace all values in [] with your fitting values!
0
 
CleanupPingCommented:
indigosmx:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
SvenTech Lead Web-DevelopmentCommented:
Try: session("MyConnectionString") = "driver={SQL Server};server=[192.168.0.1];uid=[UserID];pwd=[Password];database=[DBName]"
0
 
monosodiumgCommented:
No comment has been added to this question in more than 245 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: angelIII http:#8055760

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

monosodiumg
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now