#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Connection error on ASP classic and SQL Server 2008?


    I want to use ASP with SQL 2008 but my connection do not work . help me plz



    Microsoft OLE DB Provider for SQL Server error '80004005'

    [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.

    /test/test.asp, line 19



    -------------------------------------
    source of test.asp
    -------------------------------------
    'MS SQL Server OLE Driver

    strCon = "Provider=SQLOLEDB;Server=localhost;
    Database=test;User ID=test;Password=test;
    Trusted_Connection=False;"

    Set adoCon = Server.CreateObject("ADODB.Connection")
    adoCon.connectionstring = strCon
    adoCon.Open

    set rs = adoCon.execute("select * from test_table")

    do while not rs.eof
    test = rs("test")
    rs.movenext
    loop

    rs.Close
    set rs = Nothing

    adoCon.Close
    set adoCon = Nothing
    ------------------------------------
  2. #2
  3. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,652
    Rep Power
    2685
    Hi and welcome to the forums!

    It might be an issue with your connection string.
    Have a look at this link for connection string

    http://www.connectionstrings.com/sql-server-2008
    Laziness is my religion and Sunday is my God

    Get the Mantra!
  4. #3
  5. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    NOT work!


    I tried other connections ways but it did not work !
    plz help me

    Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=test;User Id=test;Password=test;

    Provider=SQLOLEDB;Server=localhost;User ID=test;Password=test;Database=test;
  6. #4
  7. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,652
    Rep Power
    2685
    Did you get the same error when you tried those??

    Did you try this one?
    Code:
    Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;
    Please mention the error also.

    Search google also, there might be a permission issue with the database.
  8. #5
  9. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Login failed


    Microsoft SQL Server Native Client 10.0 error '80040e4d'

    Login failed for user 'test'.

    /test/test.asp, line 21
  10. #6
  11. Couch Potato Wizard
    ASP Mastermind (5000+ posts)

    Join Date
    Jan 2005
    Location
    India
    Posts
    13,652
    Rep Power
    2685
    Check the login details, and make sure that they are correct.

    Have a look at this link and see if it helps
    http://social.msdn.microsoft.com/For...-35ac302b8d8d/

Similar Threads

  1. newbie question - SQL connection string
    By vbmntv in forum .NET Development
    Replies: 3
    Last Post: December 2nd, 2005, 01:47 PM
  2. Classic ASP and SQL 2000 Cluster! Help!!!
    By skillaid in forum Microsoft SQL Server
    Replies: 1
    Last Post: May 19th, 2005, 03:36 PM
  3. Replies: 2
    Last Post: March 31st, 2004, 11:02 AM

IMN logo majestic logo threadwatch logo seochat tools logo