Article View: borland.public.cppbuilder.database.dbexpress
Article #69Re: Oracle 817- "DBX Error: invalid Field Type" when I use AsInteger (works using AsString)
From: Ajay Pathare
Date: Sat, 10 Jul 2004 11:00
Date: Sat, 10 Jul 2004 11:00
42 lines
2784 bytes
2784 bytes
SQLDataSet1->Params->Items[0]->Value = 1; OR SQLDataSet1->Params->Items[0]->AsBCD = 1; "Changsong Bu" <changsong.bu@ps.ge.com> wrote in message news:4083d7d1$1@newsgroups.borland.com... > > I'm a newbie here frustrated with a puzzled (and simple) problem. > I use Oracle 8.1.7. My table "TestPro" has 10 fields > a, b, c, d, e, f, g, h, i, j. All integers. > I was trying to insert a record to the table using TSQLDataSet. > (tried TSQLQuery too, with the same error). > Following is my codes: > -------------------------------------------- > SQLDataSet1->CommandType = ctQuery; > SQLDataSet1->CommandText = "INsert into testPro (a, b, c, d, e, f, g, h, i, j) VAlues (:a, :b, :c, :d, :e, :f, :g, :h, :i, :j)"; > SQLDataSet1->Params->Items[0]->AsInteger = 1; > SQLDataSet1->Params->Items[1]->AsInteger = 2; > SQLDataSet1->Params->Items[2]->AsInteger = 3; > SQLDataSet1->Params->Items[3]->AsInteger = 4; > SQLDataSet1->Params->Items[4]->AsInteger = 5; > SQLDataSet1->Params->Items[5]->AsInteger = 6; > SQLDataSet1->Params->Items[6]->AsInteger = 7; > SQLDataSet1->Params->Items[7]->AsInteger = 8; > SQLDataSet1->Params->Items[8]->AsInteger = 9; > SQLDataSet1->Params->Items[9]->AsInteger = 10; > > SQLDataSet1->ExecSQL(); > -------------------------------------------- > I got the 'DBX Error: invalid Field Type' error. > > Supprisingly, when changed from "AsInteger " to "AsString" when assigning the parameter, the query works. But the fields in the table ARE all integer type. > > Anybody can help me with it, please? Thank you very much. > > Changsong
Technical Details
Message-ID:
<40efcbe2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4083d7d1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,2347f3823c41e98f,start X-Google-Attributes: gidfb4e2,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Ajay Pathare" <ajaypathare@vsnl.com> From: "Ajay Pathare" <ajaypathare@vsnl.com> Newsgroups: borland.public.cppbuilder.database.dbexpress References: <4083d7d1$1@newsgroups.borland.com> Subject: Re: Oracle 817- "DBX Error: invalid Field Type" when I use AsInteger (works using AsString) Date: Sat, 10 Jul 2004 16:30:50 +0530 Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 203.94.237.42 Message-ID: <40efcbe2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089457122 203.94.237.42 (10 Jul 2004 03:58:42 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail