🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
3 messages
3 total messages Started by PK Wed, 10 May 2006 11:02
Parameter Errors in ADOQuerry
#462
Author: PK
Date: Wed, 10 May 2006 11:02
36 lines
2020 bytes
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
Re: Parameter Errors in ADOQuerry
#464
Author: Arnie
Date: Wed, 10 May 2006 16:29
47 lines
2332 bytes
"PK" <thekariuki@yahoo.co.uk> wrote in message 
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

Are you setting values into your :parameters?

- Arnie 
Re: Parameter Errors in ADOQuerry
#300
Author: Berthold Stahn
Date: Sun, 02 Jul 2006 17:09
58 lines
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
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads