[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Connection string for SQL Server 2005 in Classic ASP Application

Posted on 2009-04-17
4
Medium Priority
?
672 Views
Last Modified: 2012-05-06
Hi,I have an Classic ASP application with SQL 2000 as DB. The application is working fine with the following connection string.
"Provider=SQLOLEDB;Data Source=machinename;Initial Catalog=dbname;Integrated Security=SSPI".
But when i configure the same application with SQL 2005 as DB i get an error. Following is the error .
Microsoft OLE DB Provider for SQL Server error '80004005'
Cannot open database "dbname" requested by the login. The login failed.
/page2.asp, line 13.
Line 13 is where i open the connection
So please tell me what i should do.
0
Comment
Question by:gowthamprabakar
4 Comments
 
LVL 12

Accepted Solution

by:
udaya kumar laligondla earned 375 total points
ID: 24165596
you can try using

for Windows Authentication
"Provider=SQLOLEDB.1;Data Source=SQLSERVER\INSTANCENAME;Initial
Catalog=MYDATABASE;Integrated Security=SSPI"

SQL authentication,
"Provider=SQLOLEDB.1;Data Source=SQLSERVER\INSTANCENAME;Initial
Catalog=MYDATABASE;User ID=SOMEUSER;Password=SOMEPASSWORD"

If you install the SQL Native Client on the web server,
"Provider=SQLNCLI.1;Data Source=SQLSERVER\INSTANCENAME;Initial
Catalog=MYDATABASE;Integrated Security=SSPI"
"Provider=SQLNCLI.1;Data Source=SQLSERVER\INSTANCENAME;Initial
Catalog=MYDATABASE;;User ID=SOMEUSER;Password=SOMEPASSWORD"
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 24165988
SQL Server 2000 >> http://www.connectionstrings.com/sql-server
&
SQL Server 2005 >> http://www.connectionstrings.com/sql-server-2005
Both have Different Connection String.

Good Luck
Carrzkiss
0
 

Author Closing Comment

by:gowthamprabakar
ID: 31571355
Thanks for the help. I modified the connection string and the databse user properties. It is working now.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question