This article was previously published under Q264687
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57978(SQLBUG_70)
After you apply Microsoft SQL Server Service Pack 2, Microsoft ActiveX Data Objects (ADO) applications that attempt to update a row in a rowset fail if you are using a server-side cursor and the column name contains spaces. The error message that occurs is:
0x80004005 (-2147467259) "Incorrect syntax near ..."
When you use ODBCDirect the following SQL Server error messages occur:
Msg 170 37000: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'nvarchar'.
Msg 13737000: [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the variable '@Session'.
This problem is due to a change in processing updates with sp_cursor calls in SQL Server 7.0 Service Pack 2.
You can use either of the following workarounds:
Use client side cursors in your application instead of using server-side cursors.
Change the column names so that the column names do not have spaces. For example, instead of "Customer Name" use "CustomerName."
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.