home *** CD-ROM | disk | FTP | other *** search
- int select_offset[10];
- int last_offset;
- int i;
-
- /* set the offset option */
- dbsetopt(dbproc, DBOFFSET, "select");
-
- /* Assume the command buffer contains the following SELECTs */
- dbcmd(dbproc, "select x = 100 select y = 5");
-
- /* send the query to \*S */
- dbsqlexec(dbproc);
-
- /* Get all the offsets to the SELECT keyword */
- for (i = 0, last_offset = 0; last_offset != -1; i++)
- if ((last_offset = dbgetoff(dbproc, OFF_SELECT, last_offset))
- != -1)
- select_offset[i] = last_offset++;
-