BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parameter not found

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Gbenga Abimbola
Guest





PostPosted: Thu Apr 01, 2004 5:13 pm    Post subject: Parameter not found Reply with 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
Gbenga Abimbola
Guest





PostPosted: Thu Apr 01, 2004 5:27 pm    Post subject: Re: Parameter not found Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.