 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gbenga Abimbola Guest
|
Posted: Thu Apr 01, 2004 5:13 pm Post subject: Parameter not found |
|
|
Hi:
Using dbExpress.
I have a SQLDataSet that I'm using thus:
if (rdByApplID.Checked ) then
if (length(lc_appl_id) > 0) then
begin
dsFindApplicant.CommandText :=
'select * from ps_applicant where appl_id = :pappl_id';
dsFindApplicant.ParamByName('pappl_id').AsString :=
lc_appl_id;
end;
when executed was getting the following message:
"dsFindApplicant: parameter 'pappl_id' not found"
However, when I provided the value directly as shown below,
it ran sucessfully.
if (rdByApplID.Checked ) then
if (length(lc_appl_id) > 0) then
begin
dsFindApplicant.CommandText :=
'select * from ps_applicant where appl_id = ' + '''' +
lc_appl_id + '''';
end;
Setting the parameter of the component at the design time did
not work either. I would like to provide different parameter
in my code in the where clause.
Your help will be greatly appreciated.
Thanks.
Gbenga
|
|
| Back to top |
|
 |
Gbenga Abimbola Guest
|
Posted: Thu Apr 01, 2004 5:27 pm Post subject: Re: Parameter not found |
|
|
Got it right. I set the dsFindApplicant to active.
I'm O.K., you don't have to respond to it.
Thanks.
Gbenga
"Gbenga Abimbola" <gabimbola (AT) columbus (DOT) gov> wrote:
| Quote: |
Hi:
Using dbExpress.
I have a SQLDataSet that I'm using thus:
if (rdByApplID.Checked ) then
if (length(lc_appl_id) > 0) then
begin
dsFindApplicant.CommandText :=
'select * from ps_applicant where appl_id = :pappl_id';
dsFindApplicant.ParamByName('pappl_id').AsString :=
lc_appl_id;
end;
when executed was getting the following message:
"dsFindApplicant: parameter 'pappl_id' not found"
However, when I provided the value directly as shown below,
it ran sucessfully.
if (rdByApplID.Checked ) then
if (length(lc_appl_id) > 0) then
begin
dsFindApplicant.CommandText :=
'select * from ps_applicant where appl_id = ' + '''' +
lc_appl_id + '''';
end;
Setting the parameter of the component at the design time did
not work either. I would like to provide different parameter
in my code in the where clause.
Your help will be greatly appreciated.
Thanks.
Gbenga
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|