home *** CD-ROM | disk | FTP | other *** search
- DBPROCESS *dbproc;
- DBINT row_number = 0;
- DBINT object_id;
-
- /* put the command into the command buffer */
- dbcmd(dbproc, "select id from sysobjects");
-
- /* send the command to \*S and begin execution */
- dbsqlexec(dbproc);
-
- /* process the command results */
- dbresults(dbproc);
-
- /* examine the data in each row */
- while (dbnextrow(dbproc) != NO_MORE_ROWS)
- {
- row_number++;
- object_id = *((DBINT *)dbdata(dbproc, 1));
- printf("row %ld, object id is %ld.\\n", row_number,
- object_id);
- }
-