Subject Re: [ib-support] API XSQLVAR struct ?
Author William L. Thomson Jr.
On Wed, 2002-07-24 at 07:46, Ivan Prenosil wrote:
> > From: William L. Thomson Jr.
> > for(int i=0;i<num_cols;i++) {
> > osqlda->sqlvar[i].sqldata = (char *)&var[i];
> > osqlda->sqlvar[i].sqltype = SQL_VARYING + 1;
> > osqlda->sqlvar[i].sqlind = &flag[i];
>
> Why do you change "sqltype" manually ?
> (Sorry if I overlooked something, I have not read whole thread)
> When you prepare the command, it will be filled automatically;
> you just need to _test_ the type, and allocate buffers that accomodate that type.
> Or do you really need data type coercion ?

Because I was following API examples. I now a a switch case based on the
type. But if you want to return all data as say a string/text then you
would want to change the type. I think. That way you could use one var
array to store all results. But that is just one way. Maybe not the best
way, but a way.


> Ivan
> http://www.volny.cz/iprenosil/interbase
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone 707.766.9509
Fax 707.766.8989
http://www.obsidian-studios.com