home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbdatlen.ex < prev    next >
Encoding:
Text File  |  1993-04-22  |  523 b   |  23 lines

  1. DBPROCESS       *dbproc;
  2. DBINT           row_number = 0;
  3. DBINT           data_length;
  4.     
  5. /* put the command into the command buffer */
  6. dbcmd(dbproc, "select name from sysobjects");
  7.  
  8. /* send the command to \*S and begin execution */
  9. dbsqlexec(dbproc);
  10.  
  11. /* process the command results */
  12. dbresults(dbproc);
  13.  
  14. /* examine the data lengths of each row */
  15. while (dbnextrow(dbproc) != NO_MORE_ROWS)
  16. {
  17.     row_number++;
  18.     data_length = dbdatlen(dbproc, 1);
  19. .ne 3
  20.     printf("row %ld, data length is %ld.\\n", row_number, 
  21.         data_length);
  22. }
  23.