Re: ESQL/C, sqlda, and datetime columns
Posted in 1993
>From: uunet!is.internic.net!hptasins (Henry Ptasinski) >Subject: ESQL/C, sqlda, and datetime columns >Date: 2 Jul 1993 18:27:59 GMT >X-Informix-List-Id: <news.3709> >Is there some other initialization I need to be doing before the fetch? Yes, lots. PREPARE. DESCRIBE. Allocate space for SQLDA storage. DECLARE. OPEN. And now you can FETCH. Which version of ESQL/C are you using? Have you got the manual to read? For a datetime, you need to allocate enough space for a dtime_t; for an interval, you need to allocate enough space for a intrvl_t; for a blob, a loc_t; and for a varchar, VCMAX(collength) + 1. You also need to initialise the datetime/interval qualifiers, and to set up the control data for any blobs. 4.00 and 4.10 rtypmsize() and ryptalign() have a blind spot for the new types introduced with 4.00 -- ie datetime, interval, varchar and blobs. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>