Re: db-lib DBNUMERIC structure

[email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.