🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2881

Re: Oracle. How to get negative numbers ?

#2881
From: Arnie Mauer
Date: Mon, 24 Feb 2003 14:21
35 lines
2011 bytes
Victor,

We use NUMBER(10) and have no problem with signed values.

- Arnie

"Victor Cazacov" <victor@kazakov.net> wrote in message
news:3e5a01b5$1@newsgroups.borland.com...
> Simple example to show my problem:
> CREATE TABLE XX_TST(
>   F_INT NUMBER(9,0)
>  )
>
>  INSERT INTO XX_TST VALUES ( 1)
>  INSERT INTO XX_TST VALUES (-1)     // Negative value !!!!!!!
>
> When I put TADOQuery component and execute query "SELECT * FROM XX_TST"
> I get dataset with two rows both containing value "1" !
>
> If I use NUMBER field type instead NUMBER(9,0), sign is not lost. It seems
> that problem occurs with types that are maped to TIntegerField class
(NUMBER
> is maped to BCD).
>
> Is there any workaround ? I can not change field type to NUMBER, because I
> need compatibility with Sybase (INTEGER field type).
>
> MDAC 2.7
> Oracle 8i
> BCB6 (with all patches)
>
> --
> Regards, Victor
>
>
Technical Details
Message-ID: <3e5a2a63@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-lei1.dfn.de!news-fra1.dfn.de!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e5a01b5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,e2ba085cccbd09f0
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-02-24 06:28:02 PST
From: "Arnie Mauer" <amauer@vrms.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e5a01b5$1@newsgroups.borland.com>
Subject: Re: Oracle. How to get negative numbers ?
Date: Mon, 24 Feb 2003 09:21:28 -0500
Lines: 37
Organization: VRMS
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 209.140.211.97
Message-ID: <3e5a2a63@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1046096483 209.140.211.97 (24 Feb 2003 06:21:23 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news-lei1.dfn.de!news-fra1.dfn.de!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail