Article View: borland.public.cppbuilder.database.ado
Article #1220Re: TADOQuery->Parameters->Index[]->Value
From: Vladimir Stefanovic
Date: Wed, 22 Sep 2004 18:47
Date: Wed, 22 Sep 2004 18:47
33 lines
1636 bytes
1636 bytes
Have you tried:
padoQry->Parameters->ParamByName( "Test" )->Value = 3683; //
<---access violation
If the error persists try renaming Test variable to some other,
because
it may be some conflict with DB's name Test.
--
Best regards,
Vladimir Stefanovic
Stephane Baillargeon <info@solutionsgestico.com> wrote in message
news:4151b7fb$1@newsgroups.borland.com...
> Hi,
>
> What is wrong with this code? I get a list out of bounds (0)
exception.
> Do I have to initialize a TParameters list before and assign it to
the
> query?
>
> TADOQuery *padoQry = new TADOQuery(NULL);
>
> padoQry->SQL->Add(" SELECT * FROM Test WHERE Test_NRI = : Test ");
>
> padoQry->Parameters->Items[0]->Value = 3683; // <---access violation
>
>
>
Technical Details
Message-ID:
<4151c844@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4151b7fb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,99111c154f0d657d X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <spam@not.needed> Newsgroups: borland.public.cppbuilder.database.ado References: <4151b7fb$1@newsgroups.borland.com> Subject: Re: TADOQuery->Parameters->Index[]->Value Date: Wed, 22 Sep 2004 20:47:02 +0200 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 213.137.116.171 Message-ID: <4151c844@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1095878724 213.137.116.171 (22 Sep 2004 11:45:24 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail