PRB: dbwritetext Returns SQL Server Message 156Last reviewed: April 3, 1997Article ID: Q105102 |
The information in this article applies to:
- Microsoft SQL Server Programmer's Toolkit, version 4.2
SYMPTOMSWhen attempting to call the dbwritetext function to update a text or image value, a DB-Library application can receive the following error message 156:
Incorrect syntax near the keyword NULL. CAUSEThis error is caused by passing a NULL text pointer value returned by dbtxptr, and a NULL text timestamp value returned by dbtxtimestamp, to the dbwritetext function. The dbtxptr and dbtxtimestamp functions return pointers to values from the current DB-Library row, similar to dbdata. The dbtxptr and dbtxtimestamp functions can return NULL values for two reasons:
WORKAROUNDEnsure that both the dbtxptr and dbtxtimestamp functions return valid, non-NULL values before passing them to dbwritetext. This can be achieved by ensuring that:
|
Additional query words: 4.20 4.20.00 dblib
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |