Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Cannot connect to SQLEXPRESS Error:18456

Results 1 to 4 of 4
Share This Thread →
  1. #1
    Ree4u's Avatar
    Ree4u is offline Contributing User
    Join Date
    Sep 2006
    Location
    Web Desert
    Posts
    92
    Rep Power
    14

    Smile Cannot connect to SQLEXPRESS Error:18456

    Hai there..please help

    I am trying to use SQL db first time so i have downloaded MS SQL EXPRESS 2005 and when i am trying to connect using object explorer with SQL Server Authentication mode it shows an error message like:

    Code:
    Cannot connect to CPQ..../SQLEXPRESS
    
    Login failed for user 'R4u' (Microsoft SQL server error, Error:18456)
    But i can connect to server using windows authentication mode..

    regards...

  2. #2
    markoc's Avatar
    markoc is offline Contributing User
    Join Date
    Nov 2003
    Location
    UK
    Posts
    2,280
    Rep Power
    310

    Cannot connect to SQLEXPRESS Error:18456

    you haven't set-up the correct permissions for the sql auth user to connect to the DB.
    Hope this advise helps.

    If so please show your appreciation by adding reputation points (click gauge image on top right of this post and score).

  3. #3
    Ree4u's Avatar
    Ree4u is offline Contributing User
    Join Date
    Sep 2006
    Location
    Web Desert
    Posts
    92
    Rep Power
    14

    Cannot connect to SQLEXPRESS Error:18456

    Quote Originally Posted by markoc
    you haven't set-up the correct permissions for the sql auth user to connect to the DB.
    hai markoc thank you for the replay...

    Bit confused...i have to setup those permissions during the installation of SQL server ?..how...?


    regards

  4. #4
    markoc's Avatar
    markoc is offline Contributing User
    Join Date
    Nov 2003
    Location
    UK
    Posts
    2,280
    Rep Power
    310

    Cannot connect to SQLEXPRESS Error:18456

    have you tried to connect to via SQL server managment studio using the sql login?

    when ur in SQL SMS try creating another user with a query something like the following and then try with VS:

    Code:
    USE YOUR_DATABASE_NAME
    GO 
    
    EXEC sp_addlogin 'NEW_USERNAME', 'USERS_PASSWORD', 'YOUR_DATABASE_NAME' 
    GO 
    EXEC sp_grantdbaccess 'NEW_USERNAME', 'NEW_USERNAME' 
    GO 
    EXEC sp_addrolemember 'db_datareader', 'NEW_USERNAME' 
    GO 
    EXEC sp_addrolemember 'db_datawriter', 'NEW_USERNAME' 
    GO 
    EXEC sp_addrolemember 'db_owner', 'NEW_USERNAME' 
    GO

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Connecting a psp to my laptop - to connect to the net (simple)
    By eviljoker7075 in forum ASP Free Lounge
    Replies: 5
    Last Post: January 19th, 2007, 04:46 AM
  2. Connect String Help
    By dalezjc in forum ASP Development
    Replies: 1
    Last Post: June 8th, 2006, 04:16 PM
  3. Unable to connect Ms Access 2003 using ASP.net
    By harishreddy in forum .NET Development
    Replies: 2
    Last Post: May 12th, 2006, 01:54 AM
  4. Replies: 2
    Last Post: July 19th, 2004, 02:40 PM
  5. help me to connect Excel file and word document with asp.net
    By nimesh910 in forum .NET Development
    Replies: 0
    Last Post: May 26th, 2004, 01:40 AM

ASP Free Advertisers and Affiliates