Microsoft KB Archive/197797

= BUG: Table Designer Error with Single Quote in a Table Name =

Article ID: 197797

Article Last Modified on 3/14/2005

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q197797



BUG #: 41946 (SQLBUG_70)



SYMPTOMS
When you try to open a table in the Enterprise Manager Table Designer and the table name includes a single quotation mark character, you will receive the following error message:

An unexpected error happened during this operation.

[MS Design Tools]-ODBC error: [Microsoft][ODBC][ODBC SQL Server

Driver][SQL Server] Line1:Incorrect Syntax near ' '

[Microsoft][ODBC][ODBC SQL Server Driver][SQL Server]Unclosed quotation

mark before the character string ')'



WORKAROUND
To work around this problem, do one of the following:

 Make changes to the table in SQL Server Query Analyzer, by using the ALTER TABLE statement.

-or-  In Query Analyzer, use the sp_rename stored procedure to rename the table so that it does not contain a single quotation mark, as in the following example:

     sp_rename [table'1], [table_1]

After the table is renamed, you will be able to use the Design Table features in Enterprise Manager to design the table. For example: 



STATUS
Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: SEM MMC quote

Keywords: kbbug kbpending KB197797

-

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

© Microsoft Corporation. All rights reserved.