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.
Author |
Topic |
alextf
Starting Member
2 Posts |
Posted - 2011-02-05 : 13:57:04
|
Problem connecting a classic asp project to SQLserver 2008 express with this query strings:conn = "Driver={SQL Server Native Client 10.0}; Server=.\SQLEXPRESS; Database= database; Trusted_Connection=yes"conn = "Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;Initial Catalog=database;UserID=sa;Password=123"conn = "Driver={SQL Server}; Server=.\SQLEXPRESS; Initial Catalog= database;Integrated Security=True;Network Library =dbmssocn"conn = "Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=database;Data Source=(local);"_______________________RETURNED ERROR:Classic ASP return this error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied._______________________SQL Server: Authentication: SQL Server and windows authentication modeI’m using IIS7 in a win 64bitDo I need a DB user and password in sql DB and querystring? is the iis7? win7 64bit?______________________Note: VB.NET can access with this conn String: "Data Source=.\SQLEXPRESS;Initial Catalog=nData;Integrated Security=True"Thanks |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-02-05 : 18:03:59
|
If SQL Native Client is intalled on the web serverProvider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;User ID="";Initial Catalog=database name here;Data Source=severName\instanceName; If it is notProvider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=database name here;Data Source=severName\instanceName make sure to specify the serverName(or ip address)\instanceName |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-02-05 : 18:22:47
|
Here's an easy way to generate connection strings that work.1. Right-click an empty spot on the desktop and choose NEW, TEXT DOCUMENT from the context menu2. Save it with a .udl extension, and click yes when it asks are you sure.3. Double-click the new udl file you just created. It will open a dialogue. Go to the Provider tab, and choose the appropriate provider.4. Go to the Connection tab and fill in the server name and database name, and choose NT authentication (or use a specific username and password, which is SQL authentication). Now click Test Connection. If it works, you're ready to click OK and move on to the final step. If it doesn't you need to resolve permission issues, or you've mis-typed something.5. Now right-click the file on the desktop and open it in notepad. It will display the connection string that you can copy and paste to wherever you need it. |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-02-05 : 18:37:26
|
I love udl's. a great feature I have used for years. They are very, very handy.I would use those and build connstr's from them. Made it real easy to change servers, just had to swap the udl file out..no recompile of code, no new deployment. Poor planning on your part does not constitute an emergency on my part. |
|
|
|
|
|