Connection string for SQL Server 2005 in Classic ASP Application

Posted on 2009-04-17
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.
Question by:gowthamprabakar
    LVL 12

    Accepted Solution

    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

    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
    LVL 5

    Expert Comment

    LVL 30

    Expert Comment

    by:Wayne Barron
    SQL Server 2000 >>
    SQL Server 2005 >>
    Both have Different Connection String.

    Good Luck

    Author Closing Comment

    Thanks for the help. I modified the connection string and the databse user properties. It is working now.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    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…
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now