Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Getting Result Data

SQL Server 2000

The simplest way to get result data is to bind result columns to program variables with dbbind and dbaltbind. Then, when a result row is accessed, DB-Library automatically places copies of the columns' data into the program variables to which they are bound.

You also can access a result column's data directly with dbdata and dbadata, which return pointers to the data. These functions are frequently used with dbdatlen and dbadlen, which return the length of the data. The dbdata and dbadata functions have the advantage of providing access to the actual data, not a copy of the data.

Binding of columns to variables must take place after the call to dbresults but before the first call to dbnextrow. No such preliminary step is needed when results will be directly accessed with dbdata or dbadata.

© 2015 Microsoft