Article View: borland.public.cppbuilder.database.ado
Article #1994reading large integer???
From: �̿��
Date: Mon, 08 Dec 2003 03:20
Date: Mon, 08 Dec 2003 03:20
37 lines
1638 bytes
1638 bytes
I created a table in mssql using
CREATE TABLE sample (value BIGINT)
And I inserted a value using
INSERT INTO sample VALUES (-12345)
Now if I tried to read the value usind TADOQuery as follows, I get 12345,
not -12345.
__int64 value;
query = "SELECT * FROM sample";
tADOQuery->SQL->Clear();
tADOQuery->SQL->Text = query.Trim();
try
{
tADOQuery->Open();
}
catch (Exception &e)
{
return;
}
if (tADOQuery->RecordCount > 0)
value = dynamic_cast<TLargeintField
*>(tDataSource->DataSet->Fields->FindField("value"))->AsLargeInt;
Can anybody tell me what I am doing wrong? Thanks in advance.
--
Yongduk Lee
ydlee@medique.co.kr
Technical Details
Message-ID:
<3fd3ee0b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,bc39068203b66421,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-12-07 19:39:07 PST From: "�̿��" <ydlee@medique.co.kr> Newsgroups: borland.public.cppbuilder.database.ado Subject: reading large integer??? Date: Mon, 8 Dec 2003 12:20:30 +0900 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 220.66.162.130 Message-ID: <3fd3ee0b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1070853643 220.66.162.130 (7 Dec 2003 19:20:43 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail