SQL Server Performance

Cannot open database requested by the login. The login failed

Discussion in 'SQL Server 2008 Questions [Archive Only - Closed]' started by nabla, Nov 15, 2011.

  1. nabla New Member

    hi!
    i have create a vizual c# program linq to sql ..when i whont to open the databse from vizual i have this error ...
    Cannot open database requested by the login. The login failed. Login failed for user
    please can someone help me ??
  2. Luis Martin Moderator

    Welcome to the forums!.
    What kind of connexion are you using?.
  3. nabla New Member

    THNX :))
    what do you mean with the kind of connexion ??
  4. Luis Martin Moderator

    ODBC or others.
  5. nabla New Member

    mmmmm i dont know :(
    when I open the database from sql it notopen to visual and vice versa
    and when i do the add student on the program, the student is adde to the datagred..but not added on the database :((
  6. Luis Martin Moderator

  7. nabla New Member

    mmm the situation is this :


    i have to create a desktop program ,and im usin vizual c# 2010 and sql server 2008 both expres edition .
    now i create the code and the connection ...bug the program doesen add the student on the database only on the datagrid
    if i open the database first on sql server i cant open it on the vizual C # ..and the error is : Cannot open database requested by the login. The login failed. Login failed for user
    but if i open the database first on vizua c i cant open then on the sql server ..and the error is : The database is not accessible (ObjectExplorer)
  8. satya Moderator

    The login failed for user errors occur if the corresponding login do not have permission to access the database, also if you are using SQL authentication then password must be checked correctly.

Share This Page