Returns a pointer to a character in the command buffer.
LPSTR dbgetchar (
INT n );
Is the DBPROCESS structure that is the handle for a particular workstation or Microsoft® SQL Server™ 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
Is the character to find in the command buffer. The first character is the 0th character.
A pointer to the nth character in the command buffer. If n is not in range, NULL is returned.
The dbgetchar function can be used to find a particular character in the command buffer. It returns a pointer to the nth character in the command buffer.
Internally, the command buffer is a linked list of nonnull-terminated text strings. Parts of the command buffer can be located and copied using the dbgetchar, dbstrcpy, and dbstrlen functions.
Because the command buffer is not just one large text string, but rather a linked list of text strings, you must use dbgetchar to index through the buffer. If you just get a pointer using dbgetchar and then increment it yourself, it will probably fall off the end of a string.