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

ID: Q197797


The information in this article applies to:
  • Microsoft SQL Server version 7.0

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 '<string>'
[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 : SSrvEntMan kbbug7.00
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: October 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.