Database logon failed RRS feed

  • Question

  • User2028249543 posted


    I am struggling to resolve my crystal report database logon error. Please see my screenshot : http://imageshack.us/photo/my-images/192/dblogonfailed.jpg/

    I use Windows Authentication log-in on my SQL Server Database.

    Here's my code behind for database logon:

    rptDoc.SetDatabaseLogon("", "", @"JOJISHEEN-PC\SQLEXPRESS", "DB_CRITH");

    I also tried my windows log in username and password however it's not working.

    Please help. Thanks.

    Wednesday, February 15, 2012 2:27 AM

All replies

  • User1196771204 posted

    Hi Sheen,

    In order for the login to work, you need to change the Windows Authentication to SQL Server Authentication. This means that you need to create a new SQL database user via the SQL Management Studio tool and then, you need to assign this user to your database with dbo_owner permission.

    Next, you need to alter your connection string on your web.config to reflect this db user details

    Please mark this response as an "answer" if it helps you. Thanks heaps! 

    Wednesday, February 15, 2012 4:47 AM
  • User2028249543 posted

    Hi necro_mancer,

    I appreciate your time looking into this thread. I have created an account in my SQL Server Authentication. Just a clarification though, how to assign my database with dbo_owner permission?

    Also how to alter my web.config file to reflect to db user details?


    Wednesday, February 15, 2012 5:10 AM
  • User1196771204 posted

    hi sheen,

    to assign a dbo_owner permission, right click the user you just created and you will see a set of permission/priviledges there. Please select dbo_owner permission

    Next, you need to alter the web.config to reflect the user you have just created. For example:

    <add name="connString" connectionString="Data Source=your_dbserver_address;uid=your_db_username;pwd=your_db_user_password;Initial Catalog=your_db_name"></add> 

    Please mark this response as an "answer" if it helps you. Thanks heaps!

    Thursday, February 16, 2012 9:29 PM