SqlFreeBuf

Clears the command buffer.

Syntax

SqlFreeBuf ( sqlconn% )

where

sqlconn%
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Remarks

This function frees any space allocated to the command buffer of the sqlconn% structure. Statements for SQL Server are added to the command buffer with SqlCmd%. After a call to SqlExec% or SqlSend%, the first call to SqlCmd% automatically calls SqlFreeBuf to clear the command buffer before the new text is entered. If you don't want the buffer automatically cleared, set the SQLNOAUTOFREE option using SqlSetOpt%. When SQLNOAUTOFREE is set, the command buffer is cleared only by a call to SqlFreeBuf.

You can access the contents of the command buffer by using SqlGetChar$, SqlStrLen% and SqlStrCpy%.

See Also

SqlCmd%, SqlExec%, SqlSend%, SqlStrCpy%, SqlStrLen%; DB-Library for Visual Basic Options