Subject | Re: [ib-support] Embedded SQL anyone? |
---|---|
Author | Peter Faulks |
Post date | 2002-04-04T02:33:47Z |
On Wed, 03 Apr 2002 13:15:50 -0500 Ann Harrison <aharrison@...>
wrote:
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
For backward compatibility, you'd have to leave isc_decode_sql_date() as
is, but perhaps a new function that actually returns the correct values
might be in order?
And I tried a cursor anyway and got -501
Would it be any good if I sent the generated blr?
Thanks and Regards
wrote:
> >1) what is the deal with isc_decode_sql_date() why is the result in thetm
> >struct a 2 digit year and why is the month off by 1?Here's a tm struct definition:
>
> Because the tm struct is a c thingy and that's the way it's
> defined.
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
For backward compatibility, you'd have to leave isc_decode_sql_date() as
is, but perhaps a new function that actually returns the correct values
might be in order?
> >2) a type decimal - seems to be off by a factor of 100 when fetchedinto a
> >float or even a double - what gives?yes
>
> Is the number defined as (n, 2) - where n is some number?
> >3) I have a query that works fine in isql but barfs in embedded sql -No, it is guaranteed to be a single row.
>
> All I can think of is that you've used the syntax for a singleton
> select and should probably use a cursor.
And I tried a cursor anyway and got -501
Would it be any good if I sent the generated blr?
Thanks and Regards