Thread7
asked on
Connection String for Classic ASP to SQL Server 2008
I am trying to use ASP code to connection to a SQL Server 2008 instance. The Web server and Database server are separate machines. We have some ASP.NET code with connection strings in a web.config file that works fine. But when I try the same connection strings with classic ASP I get an error saying:
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "
Below is the working ASP.NET string. And some of the classic ASP strings I've tried with no luck.
My guess is that it is something with the server address being:
192.168.76.101\theServer
Can I combine IP address with server name like that? If not, I don't have a named pipes name for this server that I know of.
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "
Below is the working ASP.NET string. And some of the classic ASP strings I've tried with no luck.
My guess is that it is something with the server address being:
192.168.76.101\theServer
Can I combine IP address with server name like that? If not, I don't have a named pipes name for this server that I know of.
WORKING:
<add name="FF_D1" connectionString="Data Source=192.168.1.55\theserver;Initial Catalog=SE_D1;Persist Security Info=True;User ID=CoAdmin;Password=Mypass2001"
providerName="System.Data.SqlClient" />
Error in Classic ASP:
ConnString = "Data Source=192.168.1.55\theServer;Initial Catalog=SE_D1;Persist Security Info=True;User ID=CoAdmin;Password=Mypass2001"
I've also tried this:
ConnString = "Driver={SQL Server};Data Source=192.168.1.55\theServer,1433;Network Library=DBMSSOCN;Initial Catalog=SE_D1;User ID= CoAdmin;Password=Mypass2001;"
With this one I get the error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
ConnString = "Driver={SQL Server};Server=192.168.1.55\theServer;Database=SE_D1;Uid=CoAdmin;Pwd=Mypass2001;"
ASKER
I've tried just about all these Connection Strings with no luck.
Remember I CAN connection with ASP.NET code.
I cannot simply create an ODBC system or user DSN through Control Panel. I am thinking it is because the OS on the web server is just a standard Windows 2003. There hasn't been anything else installed. Therefore maybe I need sql 2008 drivers? But then why does ASP.NET connect fine?
Remember I CAN connection with ASP.NET code.
I cannot simply create an ODBC system or user DSN through Control Panel. I am thinking it is because the OS on the web server is just a standard Windows 2003. There hasn't been anything else installed. Therefore maybe I need sql 2008 drivers? But then why does ASP.NET connect fine?
You can connect using the TCP/IP method with classic ASP.
Use this format, it'll work.
Data Source=190.190.200.100,143 3;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myP assword;
Use this format, it'll work.
Data Source=190.190.200.100,143
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
0
i got the solution................ for classical asp connection string is
myConnection.ConnectionStr ing = "Driver={SQL Server};Server=xxx.xxx.xxx .xxx,1533; Database=m ydb;Uid=us er123;Pwd= user123d;"
it will surely work dont u worry for anything..............
i got the solution................ for classical asp connection string is
myConnection.ConnectionStr
it will surely work dont u worry for anything..............
http://www.connectionstrings.com/sql-server-2008
Kindly select the appropriate connection string based upon your Client or provider