Dynamic Host Var Typing?
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
I have an ESQL function in that's called from C++ with two args char *cursor_statement, char storage[][] The idea is that this func gets called once with a cursor, which is PREPARE'd and OPEN'ed, etc. Successive calls (with cursor_statement==NULL) FETCH from the cursor into storage[][]. Storage[][] is defined with a hard-coded size that is big enough for any column in my database. My app allows the user to define an arbitary query at run-time, which is passed to this func, and the results are formatted by an (also dynamic) format string a-la printf(). The Problem: I don't like hard-coding. Could I define host variables at run time that would be of the correct type and size for any possible query? Thanks Keywords: -- |---------------------------------------------------------------------------| | Craig Ludington, independent consultant | | | craigl@mcs.com | This space unintentionally | | craigl@craigl.pr.mcs.net | left blank. | | clunding@arlingtonhgts.pamd.cig.mot.com | | |---------------------------------------------------------------------------|