ESQL/C and user located blobs
Posted in 1995
Topics: SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL
I am trying to fetch blobs by providing my own blob locating functions. The application prepares select statements dynamically, and the following code snippet handles the case where a blob needs to be fetched. (col is a sqlvar_struct pointer that scans through the select list) if (col->sqltype == CLOCATORTYPE) { loc_t* locptr = (loc_t *)col->sqldata; locptr->loc_loctype = LOCUSER; /* user programmed location */ locptr->loc_open = (int(*)())my_open; locptr->loc_close = (int(*)())my_close; locptr->loc_read = (int(*)())my_read; locptr->loc_write = (int(*)())my_write; locptr->loc_oflags = LOC_WONLY; } My problem is that when the row is actually fetched, my_open(), my_write(), and my_close() are only called once, even when there are multiple blobs in the select list. (For example, when selecting all columns from the catalog table in the stores database.) This means that all blobs except the first in the select list are not fetched. What gives? Is it impossible to have user routines handle more than one blob per select list? Any insight appreciated. Dave