home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbresults.ex < prev    next >
Encoding:
Text File  |  1993-04-22  |  533 b   |  22 lines

  1. DBINT        xvariable;
  2. DBCHAR       yvariable[10];
  3.  
  4. /* read the query into the command buffer */
  5. dbcmd(dbproc, "select x = 100, y = 'hello'");
  6.  
  7. /* send the query to \*S */
  8. dbsqlexec(dbproc);
  9.  
  10. /* get ready to process the results of the query */
  11. dbresults(dbproc);
  12.  
  13. /* bind column data to program variables */
  14. dbbind(dbproc, 1, INTBIND, (DBINT) 0, (BYTE *) &xvariable);
  15. dbbind(dbproc, 2, STRINGBIND, (DBINT) 0, yvariable);
  16.  
  17. /* now process each row */
  18. while (dbnextrow(dbproc) != NO_MORE_ROWS)
  19. {
  20.     C-code to print or process row data
  21. }
  22.