[unixODBC-support] Postgres SQL_C_SBIGINT

Roger M Strandberg / Unisoft roger.strandberg at unisoft.se
Fri Aug 13 05:00:34 BST 2004


Hi

There migth be another bug, or at leats some inconsistens

In declarations for SQL

The SQL_C_SBIGINT  becomes -25 (SQL_BIGINT(-5) + SQL_SIGNED_OFFSET(-20)).

To run the SQLGetData or the SQLBindCol with type as SQL_C_SBIGINT will
always crash the Fetch.

BECAUSE:

the copy_and_convert_field in convert.c DOES not KNOW anything about a
SQL_C_SBIGINT.

it only know's about SQL_BIGINT

There for my programs crashed if i typed:
type = SQL_C_SBIGINT;
SQLBindCol(type);

but it worked if i did:

type = SQL_C_SBIGINT;
SQLDescribeCol(&type);
SQLBindCol(type);

Postgres driver does not now about SQL_C_SBIGINT
grep SQL_C_SBIGINT *
gives nothing.

I'm not the right person to say how this should be fixed, but just a
case SQL_C_SBIGINT:
next to
case SQL_BIGINT:
in convert.c could do the trick so that SQLGetData and SQLBindCol also
understands SQL_C_SBIGINT


Remark
I'm making a C++ wrapper so that i can convert PowerHouse(TM to cognos)
applications.
Usally we store amounts in bigint with a imaged decimal point usally *100
(SEK is not so big, with EURO it's *10000)
There for i have in my tables (all123 tables) bigint  (accounts recivable
and  general ledger ( nominal legder?))
That becomes 463 BIGINT field's so the shit has to work.

/R Thanks again for a GOOD product!

----- Original Message ----- 
From: "Nick Gorham" <nick at easysoft.com>
To: "Support for the unixODBC project" <unixodbc-support at mail.easysoft.com>
Sent: Thursday, August 12, 2004 11:55 PM
Subject: Re: BUG SOLVED : [unixODBC-support] Re: Postgres 7.2 SQL_C_DOUBLE


> Roger M Strandberg / Unisoft wrote:
>
> > Hi
> >
> >
> > I'm sorry for the problem with so many email, but i have a deadline.
> >
> >
> > *Thow i think i found the bug.*
>
>
> Great, thanks, did you check the current postgres driver, the code in
> unixODBC is based on this, maybe they alredy made this change.
>
> I will take a look myself tommorow.
>
> -- 
> Nick Gorham
> Easysoft Limited
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mail.easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
>





More information about the unixODBC-support mailing list