Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Home / ESQL / sqlda_funcs
Name Modified Size InfoDownloads / Week
Parent folder
describe.ec 2020-05-11 6.6 kB
readme.txt 2020-05-11 1.6 kB
Totals: 2 Items   8.2 kB 0
From: johnl@informix.com (Jonathan Leffler)
Newsgroups: comp.databases.informix
Date: 13 Sep 1993 15:48:22 -0400

>From: gm0564@swuts.sbc.com (George Ma)
>Subject: datetime data
>Date: 13 Sep 93 14:56:36 GMT
>
>Has any one had experience to retrieve datetime type data into sqlda and then
>to convert it into char string using dttoasc()?
>I tried but dttoasc() failed to provide correct data.
>
>I wonder whether datetime type data has to be FETCHed INTO a host variable of
>type dtime_t but cannot be loaded into sqlda since there is no way to
>initialize dt_qual field if sqlda is used?

1.  Be careful with the version of ESQL/C you are using.  There are bugs in
    rtypemsize() and rtypmalign which are only fixed in 5.00 and above.

2.	The code below is what I use for handling sqlda structures.  This has
  	code for both 5.00 and earlier versions.  It is straight out of a
  	program of mine, so some of the headers may not be available, but it
  	should be a good starting point.  You do not need to initialise the
  	dt_qual field in the allocated data space -- the interface code will
  	sort that out for you.

Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>

Notes: MALLOC is a macro which calls a malloc cover function which
guarantees not to return a null pointer.  It is defined in the missing
emalloc.h header. error2 is an error reporting function defined in the
missing stderr.h header.  The missing header describe.h contains the
declarations for the sql_describe() function.  I have previously posted
the esqlc.h headers which contains prototypes for ESQL/C functions.

Source: readme.txt, updated 2020-05-11