dbgetoff

Description

Check for the existence of Transact-SQL constructs in the command buffer.

Syntax

int dbgetoff(dbproc, offtype, startfrom)
 
DBPROCESS       *dbproc;
DBUSMALLINT     offtype;
int                          startfrom;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

offtype

The type of offset you want to find. The types, which are defined in the header file sybdb.h, are:

OFF_SELECT OFF_FROM OFF_ORDER OFF_COMPUTE OFF_TABLE OFF_PROCEDURE OFF_STATEMENT OFF_PARAM OFF_EXEC

See Options for details.

startfrom

The point in the buffer at which to start looking. The command buffer begins at 0.

Returns

The character offset into the command buffer for the specified offset. If the offset is not found, -1 is returned.

Usage

See also

dbcmd, dbgetchar, dbsetopt, dbstrcpy, dbstrlen, Options