Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: Cannot open database

    Hi i am currently doing my final year project. I am using MS SQL and ASP. I uncounter the error below when i am doing my login.

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 's01673925'. Login fails.

    this is my connection string:
    Set connection = Server.CreateObject("ADODB.Connection")
    connection.Open "DSN=LocalServer1;UID=s01673925;PWD=password;DATAB ASE=s01673925"

    Can any1 help mi by telling mi why i cant connect 2 database?

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: Cannot open database

    did you test your DSN connection when you created it ?

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    As it seems to the a security issue, ensure the login used have required permission to access the database.

    Go thru this KBA to fix the issue.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Cool...it's your final and you can't connect...must be a great course...

    What's your major?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    BK : Arrête d'être aussi énervé pour un rien
    Pense à ta tension
    Un arrêt cardiaque peut arriver si vite

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Lighten up france'es....**

    Let me ask you.

    Your in school..you take a class in SQL Server...

    It's the end of the term....

    And you don't know how to connect?

    What does that say?

    1 of 2 things, doesn't it...

    And yes google has a wonderful translator.....


    ** Bill Murray reference....who got screwed last night....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    it's not the END of his term (I hope)

  8. #8
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Are you sure your UID and DATABASE parameters are supposed to be the same? Try replacing DATABASE=s34765345 with DATABASE=pubs

  9. #9
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393
    Did you put the instance name after the server name
    in the DSN ?

    ServerName\InstanceName

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •