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

Newbie question: SQLClient in ASP.Net

Status
Not open for further replies.

info25

Programmer
Apr 18, 2002
5
SG
Hi
Whenever I tried accessing my SQL Server 7.0 database with SQLConnection in ASP.Net, I always get the error: 'Specified SQL server not found'. My code is like:

Dim Con As New SQLConnection("server=SQLSRV;database=northwind")
Conn.open()

SQLSRV is the name of my SQL server on the network. In the ASP days, I usually use DSN to access the SQL server and all works OK.
Can anyone tell me what I should do to corrrect this?
And should I specify user id and password for the connection string? Are they the same as the DSN UID and pwd?
I think I can do it in DSN way, but I need to download ODBC.Net data provider, but it requires MDAC 2.7 or later. And Micosoft's MDAC download page says: 'Due to issues with clustering, this release is currently NOT supported on SQL Server 7.0 Servers or SQL 6.5 Clustered Servers. '! Huh? Does this mean I can't use ODBC?
Oh BTW, I just installed MDAC 2.6 on the web server. Can that be the cause of the problem?
Thanks!
 
I noticed that you declare Con as New SqlConnection then you use: Conn.open() ---> Conn spelled with 2 n's
That may be your problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top