Error while connecting to server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shikha1234
    New Member
    • Mar 2008
    • 10

    Error while connecting to server

    My server is on Windows XP pro. Its Sql Server 2000.
    When I am trying to access it from a client machine through ASP .Net, it is giving me an exception while opening the connection conn.Open();

    System.Data.SQL Client.SQLExcep tion.
    {"Cannot open database requested in login 'Database Name'. Login fails.\r\nLogin failed for user 'sa'."}

    I tried everything. Change the configuration mode of the server to mixed configuration mode, enabled TCP/IP etc.

    No idea what could be the problem.
    Do server installations need to have a check at some necessary things/configurations? ?

    Please help.
  • malav123
    New Member
    • Feb 2008
    • 217

    #2
    Originally posted by Shikha1234
    My server is on Windows XP pro. Its Sql Server 2000.
    When I am trying to access it from a client machine through ASP .Net, it is giving me an exception while opening the connection conn.Open();

    System.Data.SQL Client.SQLExcep tion.
    {"Cannot open database requested in login 'Database Name'. Login fails.\r\nLogin failed for user 'sa'."}

    I tried everything. Change the configuration mode of the server to mixed configuration mode, enabled TCP/IP etc.

    No idea what could be the problem.
    Do server installations need to have a check at some necessary things/configurations? ?

    Please help.







    Hi,
    shikha...
    do as given below.....
    Open the Notepad and blank file save with ".udl" extension on desktop... than double click that file than you will get one window for database connection called datalink Properties... in that window select Provider as sql server and than select server and username and password then select database then test the connection if it succeds...
    than open again that file in notepad u will get connection string so copy this connection string in web.config file....
    definately your problem will be solved.....

    Comment

    • Shikha1234
      New Member
      • Mar 2008
      • 10

      #3
      Originally posted by malav123
      Hi,
      shikha...
      do as given below.....
      Open the Notepad and blank file save with ".udl" extension on desktop... than double click that file than you will get one window for database connection called datalink Properties... in that window select Provider as sql server and than select server and username and password then select database then test the connection if it succeds...
      than open again that file in notepad u will get connection string so copy this connection string in web.config file....
      definately your problem will be solved.....
      thanks a ton..but it got solved by installing SP4 for sql server 2000.

      Comment

      • malav123
        New Member
        • Feb 2008
        • 217

        #4
        Originally posted by Shikha1234
        thanks a ton..but it got solved by installing SP4 for sql server 2000.
        Ok but store your connection string in web.config file...
        you will not face problem in the future....

        Comment

        Working...