WHAT IS THE CONNECTION STRING THAT WILL WORK IN discountasp.net HOSTING to connect to an sql 2005 ex

Discussion in 'Classic ASP' started by dmayer, Feb 12, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. i am trying to connect from my classic asp code in discountasp.net hosting to an sql 2005 express in another location. i tried using the code everyone is positng in the internet:

    Provider=SQLNCLI;Server=myServerAddress;Database=myDataBase;Uid=myUsername;

    And when I try using that in your server I get:

    ADODB.Recordset error '800a0e7a'

    Provider cannot be found. It may not be properly installed.

    WHAT IS THE CONNECTION STRING THAT WILL WORK IN discountasp.net HOSTING to connect to an sql 2005 express PLEASE!

    thanks
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Try

    'Provider=SQLOLEDB;Data Source=YOURDBSERVER;Initial Catalog=YOURDBNAME;User Id=YOURUSERID;Password=YOURPASSWORD;'

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hi bruce

    did not work. this is the result:

    Microsoft OLE DB Provider for SQL Server error '80004005'

    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    /test.asp, line 14

    you can test it your self here: http://www.phone-id.com/test.asp

    For sure the server exist, is running, is now being accesed by other applications form outside its network, etc.

    If the hosting would provide the chance to use the Provider=SQLNCLI would be faster, i dont see the difference between enabling SQLOLEDB but not SQLNCLI

    thanks for your help
     
  4. Hi,
    This is the way I used to do classic ASP SQL connections and recordsets on DASP servers:

    dim boxCon, boxRS
    set boxCon = Server.CreateObject('ADODB.Connection')
    set boxRS = Server.CreateObject('ADODB.Recordset')
    boxCon.Open 'Provider=SQLOLEDB;Data Source=mssql.discountasp.net;database=DB_wisecode;uid=DB_2wisecode_user;pwd=passwordhere;'

    Salute,
    Mark

    Technical Evangelist for DiscountASP.NET

    Find ASP.NET code samples with my Dev Coop search tools below.
    Google
    Microsoft

    DiscountASP.NET Technical Webcasts:
    http://www.iis7test.com/webcasts/

    My Microsoft Technical Blogs
    http://weblogs.asp.net/markwisecarver/
    http://blogs.windowsclient.net/wisecarver/default.aspx
     
  5. thanks for your time mark

    the question is not how to connect to an SQL that is IN discount.asp, i have my asp pages there, and need to connect to my own sql server outside and i can not get to the connection strting ofr a 2005 express. I did it for years for a sql 2000 but not for 2005

    thanks
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    the error '[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.' means that the application cannot access the SQL server.

    Your SQL server may be sitting on a network that does not allow remote connection. I am certain that our network does not block outbound connection. You should check w/ the DB admin of the SQL server.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. i am the db admin of that server, and the server is configured to accept tcp and named pipes connections, and actually is being accessed and managed remotely by management studio and also a telephony application connects to it by and odbc connection.
     
  8. Bruce

    Bruce DiscountASP.NET Staff

    I think you should create a support ticket and we can perform some test to make sure the connection is opened.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  9. my account domain is phone-id.com

    you can get into the test.asp page in the root folder and you have all the connection info there, i created tickets, and they sent me here.
    thanks

    daniel
     
  10. Bruce

    Bruce DiscountASP.NET Staff

    please reopen the ticket and reference this post.

    please also supply the SQL server name or IP.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
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