dbfreebuf

Clears the command buffer.

Syntax

void dbfreebuf ( 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.
Remarks

This function frees any space allocated to the command buffer of the DBPROCESS structure. The command buffer is then set to NULL. Commands for SQL Server are added to the command buffer with the dbcmd or dbfcmd function.

After a call to dbsqlexec or dbsqlsend, the first call to either dbcmd or dbfcmd automatically calls dbfreebuf to clear the command buffer before the new text is entered. If this situation is undesirable, set the DBNOAUTOFREE option. When DBNOAUTOFREE is set, the command buffer is cleared only by a call to dbfreebuf.

The contents of the command buffer can be accessed through the dbgetchar, dbstrlen, and dbstrcpy functions.

See Also
Bulk-Copy Functions dbsqlexec
dbcmd dbsqlsend
dbfcmd dbstrcpy
dbgetchar dbstrlen
DB-Library Options  

  


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