Example 11: Retrieving an image

The example11.c sample program 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:

For more information on dbreadtext, see the Open Client DB-Library/C Reference Manual.

NoteAccess to Adaptive Server and the pubs2 database is required.