Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: Parameter Errors with ADO


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0 Threads: [ Previous | Next ]
William Brookfi...

Posts: 42
Registered: 1/1/10
Parameter Errors with ADO  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 5, 2017 10:02 AM
We are migrating a large number of apps built in Delphi 2006 to Delphi 10.1.2 Berlin.

We have encountered an issue that we have been unable to resolve. We use Parameters to connect Master to Detail ADOqueries.
This has resulted in random errors when the Adoquery attempts to open indicating missing or invalid Parameters or parameter values.
These errors do not happen all then time and is difficult to re-produce.

Is there any specific changes required to use Parameters reliable with ADO components in XE10?

Example with no Master Datasource set.

qryFees.sql.text:='SELECT * FROM FEETBL WHERE REF_KEY = :REF_KEY';
qryFees.Parameters.ParamByName ('REF_KEY').Value := _PVNbr;
qryFees.Open;

If most cases were have a childQry with it Datasource Property set to the Masterqry. The SQL for the childQry looks like
Childqry.sql.text:='SELECT * FROM CHILDTBL WHERE MASTERKEY = :MASTERKEY'
Where MASTERKEY is common field between child and master

Where do have the ParamCheck Property CHECKED on the AdoQuery commponents that have Parameterized SQL
Were do not checked the Prepaired checkbox. Should we do this?

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02