🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO not able to read a negative number from database

#1563
From: aderiggi
Date: Mon, 17 May 2004 19:44
30 lines
2006 bytes
"Arnie Mauer" <xxx@nowhere.net> wrote:
>"aderiggi" <derigga@dbcc.edu> wrote in message
>news:40a91228$1@newsgroups.borland.com...
>>
>> I am converting a BDE application over to the ADO componenets. I am having
>a problem with the ADO components pulling a negative value from the
>database. It converts the negative value to a positive value. What can I do
>to resolve this?
>
>Which ADO component?  What DB?  What's the column definition?  What version
>of MDAC?
>
>- Arnie
>
>
I am using an ADO connection and ADO Query Components. I am connecting to a informix database. The column definitions are integers.
The following is the sql statement I am running:

select (xxx.max_reg - xxx.reg_num)seats 
from xxx 
where crs_no = 'xxx' and sec_no = 'xx' and yr=xxxx and sess='xx'

max_reg = 30
reg_reg = 32
seats should = -2

I get 2 back using the ADO components. 
I get -2 (the correct value) using the BDE components.

- Anthony
Technical Details
Message-ID: <40a9162f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!prodigy.com!atl-c02.usenetserver.com!c03.atl99!news.usenetserver.com!news02.tsnz.net!newsfeed01.tsnz.net!ken-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail
References: <40a91228$1@newsgroups.borland.com> <40a912a5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,8e06cfa3972c7348
X-Google-Attributes: gid10698b,public
From: "aderiggi" <derigga@dbcc.edu>
Sender: "aderiggi" <derigga@dbcc.edu>
Reply-To: "aderiggi" <derigga@dbcc.edu>
Subject: Re: ADO not able to read a negative number from database
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 169.139.176.84     
References: <40a91228$1@newsgroups.borland.com> <40a912a5$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <40a9162f$1@newsgroups.borland.com>
Date: 17 May 2004 12:44:47 -0700
X-Trace: newsgroups.borland.com 1084823087 207.105.83.66 (17 May 2004 12:44:47 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!prodigy.com!atl-c02.usenetserver.com!c03.atl99!news.usenetserver.com!news02.tsnz.net!newsfeed01.tsnz.net!ken-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail