Article View: borland.public.cppbuilder.database.ado
Article #300Re: Parameter Errors in ADOQuerry
From: Berthold Stahn
Date: Sun, 02 Jul 2006 17:09
Date: Sun, 02 Jul 2006 17:09
58 lines
2878 bytes
2878 bytes
Hi , I've got just the same error some days ago. I don't believe that you fully understand, what Arnie has answered. He is right, this is just to clarify. There's an property called 'parameters' within TADOQuery. You may use them in your SQL QUERY. The format is :parametername .. Everytime you're using ":" in your SQL TADOQuery is searching the respective parameter. That's all. BR "PK" <thekariuki@yahoo.co.uk> schrieb im Newsbeitrag news:4461c82e$1@newsgroups.borland.com... > > Hello! > Am currently converting the database in my appication from > Interbase(using InterBase Components) to Oracle 8i(Using the ADO > components). > Whenever I fill the SQL property of an ADOQuerry with statements > that have parameters e.g > " > SELECT SB.NAME, SI.VARIETY, SUM(IIT.QTY) ,SUM(IIT.SPRICE*IIT.QTY) > > FROM STOCK_BRAND SB, STOCK_ITEM SI, ITEM_IN_TRANSACTION IIT, TRANZACTION > T, UZER U > > WHERE IIT.RECEIPTNO=T.RECEIPTNO AND > U.USERID=T.USERID AND > IIT.BARCODE=SI.BARCODE AND SB.STOCKBRANDID=SI.STOCKBRANDID AND > T.TRANZDATE BETWEEN :StartDate AND :StopDate AND > T.TILLID LIKE :TillID AND > U.USERNAME LIKE :UserName > > GROUP BY SB.NAME, SI.VARIETY > ", > I get an error whenever I try to set Active=true. > The error is: > "Parameter object is improperly defined. Inconsistent or > incomplete information was provided." > Note that no error occurred when I used an IBQuerry. > > This same problem has made it hard for me to access the fields of > the querries for use in QReports. Whenever I try to accesss the > DataField property of QRDBEdit whose DataSet is the querry > described above, I get the same error as above. > > Please help me resolve my problem. > > Kind regards, > PK > >
Technical Details
Message-ID:
<44a7fdec$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4461c82e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,632b5683f2c93c72 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Berthold Stahn" <Berthold.Stahn@teleos-web.de> From: "Berthold Stahn" <Berthold.Stahn@teleos-web.de> Newsgroups: borland.public.cppbuilder.database.ado References: <4461c82e$1@newsgroups.borland.com> Subject: Re: Parameter Errors in ADOQuerry Date: Sun, 2 Jul 2006 19:09:45 +0200 Lines: 59 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 NNTP-Posting-Host: 213.182.108.12 Message-ID: <44a7fdec$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1151860204 213.182.108.12 (2 Jul 2006 10:10:04 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail