Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DB user & password

Author  Topic 

alextf
Starting Member

2 Posts

Posted - 2011-02-04 : 12:34:03
I’m trying connecting my vb and classic asp project to SQLserver 2008 express with this query strings:
VB.NET: "Data Source=.\SQLEXPRESS;Initial Catalog=nData;Integrated Security=True"
Classic ASP "Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=nData;Data Source=(local);"

VB.NET succeed
Classic ASP return this error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
Authentication: SQL Server and windows authentication mode
Do I need a DB user and password in both sql db and querystring?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-02-04 : 13:00:11
Your data source is wrong in the Classic ASP connection string. Use HostName\SQLEXPRESS instead of (local) or (local)\SQLEXPRESS. I prefer to use HostName. You can get the value of HostName by running hostname from a cmd window.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -