INF: Result Processing for SQL Server (165951)
The information in this article applies to:
- Microsoft SQL Server Programmer's Toolkit 4.2
- Microsoft Open Database Connectivity 2.5
- Microsoft Open Database Connectivity 3.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q165951 SUMMARY
When using Microsoft DB-Library, VBSQL (VBX and OCX), or ODBC to access SQL
Server, it is critical that all result sets are completely processed in a
timely manner. The result sets need to be processed to avoid problems with
subsequent SQL Server queries and to avoid concurrency issues with SQL
Server resources.
In most cases the return code from dbsqlok or dbsqlexec should be ignored.
If you send the following batch:
insert into tblTest values(1)
select @@VERSION
and the insert statement fails due to a duplicate key, a Sev 14 error is
generated but the batch continues. THe dbsqlok and dbsqlexec calls only
check the success of the first command. If you do not call dbresults you
will not process the select statement results and can get result pending
errors.
Modification Type: | Minor | Last Reviewed: | 3/1/2005 |
---|
Keywords: | kbBug kbhowto kbProgramming kbusage KB165951 |
---|
|