home *** CD-ROM | disk | FTP | other *** search
- DBINT xvariable;
- DBCHAR yvariable[10];
-
- /* read the query into the command buffer */
- dbcmd(dbproc, "select x = 100, y = 'hello'");
-
- /* send the query to \*S */
- dbsqlexec(dbproc);
-
- /* get ready to process the results of the query */
- dbresults(dbproc);
-
- /* bind column data to program variables */
- dbbind(dbproc, 1, INTBIND, (DBINT) 0, (BYTE *) &xvariable);
- dbbind(dbproc, 2, STRINGBIND, (DBINT) 0, yvariable);
-
- /* now process each row */
- while (dbnextrow(dbproc) != NO_MORE_ROWS)
- .ne 3
- {
- C-code to print or process row data
- }
-