The example11.c retrieves an image from the au_pix table in the pubs2 database. The author ID you enter determines which row the program selects. After retrieving the row, this sample copies the image contained in the pic field to a file you specify.
There are two ways to retrieve a text or image value from Adaptive Server:
This sample selects the row containing the value and processes the row using dbnextrow. After dbnextrow is called, dbdata can be used to return a pointer to the returned image.
The other method is to use dbreadtext with dbmoretext to read a text or image value in the form of a number of smaller chunks.
For more information on dbreadtext, see the Open Client DB-Library/C Reference Manual.
To use this sample, you must be able to access Adaptive
Server and the pubs2 database.