Re: db-lib DBNUMERIC structure
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 12, 2011 at 01:11:01PM +0200, LacaK wrote:
> typedef struct dbnumeric
> {
> char precision;
> char scale;
> unsigned char val[MAXNUMLEN];
> } DBNUMERIC;
>
> for retrieving exact numeric data.
>
> But I can not find, how to interpret/read "val" array to construct number.
Just to remind you, you could just bind the type to DBFLT4 or DBFLT8
(FLT4BIND or FLT8BIND). Or use dbconvert().
If you want the sausage-factory details, cf. tds_convert() source code.
--jkl