SQL Database Connection String Help

Discussion in 'Databases' started by RussellG, Jun 27, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I need help with the database connection string change. Here's what I was told that it is for my DiscountASP account:

    "Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_*****_(dbname);User ID=SQL2008_******_(dbname)_user;Password=******;"

    Below is my database connection file contents from the hosting service I'm changing from. Could someone tell me how to change it to properly use the DiscountASP connection string above?

    I also wasn't sure about the "DSN=CinemaReview2000..." part. It is even needed for the DiscountASP service?

    CURRENT CONNECTION STRING:
    <%
    Set db = Server.CreateObject("ADODB.Connection")
    db.ConnectionString = "Driver=SQL Server;server=VCNSQL82\I82;database=(dbname);uid=*****;pwd=*******"
    'db.Open "Driver=SQL Server;server=VCNSQL82\I82;database=(dbname);uid=*****;pwd=*******"
    'db.Open "DSN=CinemaReview2000;uid=******;pwd=********;"
    dc=date()
    db.open()
    %>

    MY ATTEMPT TO MODIFY CONNECTION STRING:
    <%
    Set db = Server.CreateObject("ADODB.Connection")
    db.ConnectionString = "Driver=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_743940_(dbname);User ID=SQL2008_*****_(dbname)_user;Password=******;"
    'db.Open "Driver=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_743940_(dbname);User ID=SQL2008_743940_(dbname)_user;Password=******;"
    'db.Open "DSN=CinemaReview2000;uid=******;pwd=********;"
    dc=date()
    db.open()
    %>
     
  2. Hi,
    We can help but need more info about where you are trying to do this.
    i.e. ASP.NET web.config, Classic ASP, a Forum package, etc.
    All the best,
    Mark
     
  3. I have an old classic ASP site.
     
  4. Hi,
    This is the way I used to do Classic ASP conn strings for that:

    Dim strCon
    strCon = "Provider=SQLOLEDB;Data Source=tcp:sql2k510.discountasp.net;database=SQL2005_418915_user;uid=SQL2005_418915_some_user;pwd=password;"
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page