Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Returning large numbers to Pro*C variable

Re: Returning large numbers to Pro*C variable

From: Peter Sylvester <peters_at_mitre.org>
Date: Tue, 07 Apr 1998 20:13:13 -0400
Message-ID: <352AC117.E97DF623@mitre.org>


I think you may lose some precision with doubles. If you want to preserve everything you probably have to fetch into a character string and use atoll().

Peter

Andrew Protasov wrote:

> Hi,
>
> There are no 8-byte integers (type 3) as external datatype in OCI.
> They can be only of 1, 2 or 4 bytes. Try to use double (type 4).
> 8-byte doubles will represent your 12-digit integers without loss
> of precision.
>
> Andrew Protasov
>
> adas1_at_spspay.com wrote in message <6gaqj1$e05$1_at_nnrp1.dejanews.com>...
> >Hi
> >Does anyone have ant experience retrieving large integer values
> >from an Oracle Sequence ?
> >I am trying to retrieve a large number (Number (12)) from an Oracle
> >Sequence into a Pro*C variable defined as "long long int" which is a 8-byte
> >integer. This has been uncessful thus far as only the 4 leading bytes are
> >populated and the trailing 4 bytes left untouched.
> >Is there any other way to handle this except declare the return
> >variable as a char string ?
> >
> >TIA
> >
> >-----== Posted via Deja News, The Leader in Internet Discussion ==-----
> >http://www.dejanews.com/ Now offering spam-free web-based newsreading
Received on Tue Apr 07 1998 - 19:13:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US