dbdataready

Determines whether database command processing sent data back to the client is ready to be processed.

Syntax

BOOL dbdataready ( PDBPROCESS dbproc );

Arguments
dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
Returns

TRUE if data is available to be read; FALSE otherwise.

Remarks

This function allows an application to continue processing while SQL Server is actually performing the database operation.

The dbdataready function is ordinarily used after a call to dbsqlsend and before a call to dbsqlok. After dbsqlsend, SQL Server begins executing the commands in the command buffer. When dbsqlok is called, DB-Library for C waits for SQL Server to finish processing before returning control to the application.

The dbdataready function provides a way to determine when data is available for processing. It should be called repeatedly until it returns a nonzero value. At that point, the application can call dbsqlok, dbresults, and dbnextrow.


Important It is possible for dbdataready to return FALSE forever if another process has a conflicting lock or if the connection is broken. The calling program should contain a time-out mechanism.


See Also
Building Applications dbsqlok
dbresults dbsqlsend
dbsettime  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.