Working with a smart-large-object data structure

You can use this procedure to work with a smart-large-object data structure. An example is included.

About this task

To work with a smart-large-object data structure:

Procedure

  1. Determine the size of the smart-large-object structure.
  2. Use either a fixed size array or a dynamically allocated buffer that is at least the size of the data structure.
  3. Free the array or buffer space when you are done with it.

Results

The following code example illustrates these steps:
rc = SQLGetInfo(hdbc, SQL_INFX_LO_SPEC_LENGTH, &lospec_size, 
   sizeof(lospec_size), NULL); 
lospec_buffer = malloc(lospec_size); 
;
free(lospec_buffer);