INF: Invalid Use of dbwritetext Can Cause 806 ErrorsLast reviewed: May 2, 1997Article ID: Q139555 |
The information in this article applies to:
SUMMARYAttempting to use a single DBPROCESS to read data and perform a dbwritetext call can generate 806 errors.
MORE INFORMATIONAs shown in the SQL Server "Programmers Reference for C," two DBPROCESS structures are used to perform a valid dbwritetext operation. Some incorrect interpretations of the sample are to use one DBPROCESS. To accomplish this, the dbtxttimestamp and dxtxtptr functions are called immediately after the dbnextrow call and stored in local DBBINARY variables. However, the dbtxtptr only returns a pointer to the result set. In order to perform the dbwritetext operation without results pending on the single connection, you must finish processing all rows with dbnextrow or dbcancel calls. When the dbnextrow or dbcancel function is called, it accordingly clears the result set space, thus invalidating the dbtxtptr you stored in the memory variable. When the call to dbwritetext is made with an invalid dbtxtptr value error #806 can be generated. The use of a single process is dangerous.
|
Additional query words: windows nt function
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |