BUG: Error "Login Failed" from Data View Window If Allow Saving Password Is Not Checked (293111)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0
  • Microsoft SQL Server 7.0
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q293111

SYMPTOMS

If you create a Microsoft Visual Studio database project that uses either the Microsoft OLE DB Provider for SQL Server (SQLOLEDB) or the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL) to connect to SQL Server with a standard SQL login that requires a password, you can browse database objects in the Data View window as expected if you do not select the Allow saving password check box when you create the initial database connection in the Data Link Properties dialog box. However, if you try to execute one of the stored procedures that is listed, you receive the following error message:
Login failed for user 'user name'

CAUSE

This problem occurs because the Data View window does not have your password and fails to prompt you for it.

RESOLUTION

To work around this problem, when you use a standard SQL login that requires a password, select the Allow saving password check box when you create a new database project that connects to SQL Server. You can also use a Trusted Connection to connect and avoid this problem.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Visual InterDev, and create a new Visual Studio database project.
  2. Complete the information as necessary to connect to a SQL Server, using either SQLOLEDB or ODBC. Use a standard SQL Server login that requires a password. Do not select the Allow saving password.
  3. Browse the Data View window. Notice that the tables, views, and stored procedures of the database are listed as expected.
  4. Right-click one of the stored procedures that is listed, and then click Execute. Rather than execute the stored procedure or prompt you for your logon information, the Data View window returns the above-mentioned "Login failed" error message.

Modification Type:MajorLast Reviewed:5/8/2003
Keywords:kbbug kbDataview kbpending kbStoredProc KB293111