Microsoft KB Archive/194010

= PRB: Table Names Using Quoted Identifiers Do Not Open Properly =

Article ID: 194010

Article Last Modified on 3/16/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Enterprise Edition

-



This article was previously published under Q194010



SYMPTOMS
When you open, or design against, existing tables in the Visual InterDev Data View, one of the following error occurs:

-Table 'tablename' no longer exists in the database.

-[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'tablename'.

-Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ' '. / /_ScriptLibrary/Recordset.ASP, line 466



CAUSE
This occurs when you attempt to view or open a table with a space in its name in Design View, or if the "Use ANSI quoted identifiers" option is not selected when you create the data connection to the database.



RESOLUTION
To avoid this problem, you can use one of the following workarounds:
 * 1) Delete the existing data connection from the project.
 * 2) Ensure that the option "Use ANSI quoted identifier" is selected in the Add data connection wizard, and then add a new Data Connection to the database.

-or-


 * 1) Recreate the table with a valid SQL Server name (no spaces).



STATUS
This behavior is by design.



Steps to Reproduce Behavior

 * 1) Create a new Database Project.
 * 2) Add a new SQL Server data connection. Make sure that the option "Use ANSI quoted identifiers" is not selected. You can find this option in the Add Data Connection wizard, on the pane that has the option "Change the Default Database to:".
 * 3) In the Data View tab of Visual InterDev, locate or create a table with a space in its name.
 * 4) Right-click on the table and click Design or Open.

-or-

 Create a new non-database project and add an ASP page, or add an ASP page to an existing non-database project. Drag a recordset Design-Time control (DTC) to the  portion of the page. Right-click on the DTC and click Properties. Set the Connection to the DSN where the option "Use ANSI quoted identifiers" is not selected. Set the Database Object to TABLES, and set the Object Name to the name of the table that contains a space.  Save the page and use the View in Browser feature. The following error appears: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ' '. / /_ScriptLibrary/Recordset.ASP, line 466 </ol>

Keywords: kberrmsg kbprb KB194010

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.