Error: Syntax Error or Access Violation

Visual Studio 6.0

Full Error Text: Syntax error or access violation. State:37000,Native:7134,Origin:[Microsoft][ODBC SQL Server Driver]

The SQL Server Service Pack 2 (06.50.0240) that ships with the Visual C++ Enterprise Edition has a bug that may cause a failure in CRecordset::Edit mode during the call to CRecordset::Update.

Although previous versions of the ODBC driver turned these items ON by default, the ODBC driver that ships with this version of SQL Server now gives you the option to turn ON or OFF the following items:

  • Use ANSI Quoted Identifiers

  • Use ANSI Nulls, Padding, and Warnings

If you encounter this error and you have Use ANSI Nulls, Padding, and Warnings turned ON, try the following workaround:

  1. Open the ODBC Data Source Administrator using the icon in the Control Panel.

  2. Select your SQL Server Data Connection and click Configure.

  3. Click Options.

  4. Clear the Use ANSI Nulls, Padding and Warnings option