Subject | help with stored procedures(help 2) |
---|---|
Author | Daniel Bertin |
Post date | 2004-02-24T12:59:09Z |
hi all,
I tried Prepare, and defined the params property in the query, also
removed the suspend in the stored procedure, same error. Is it possible
that insertSQL does not take parameters, using paramByName?
Would someone know the answer to this. How can I pass a parameter to
InsertSql?
the code below did not work.
Thanks
Daniel
Error message:
"FieldName "ADD1" not found"
Procedure:
with DataM.AllLoc do
begin
ReadOnly := False;
RequestLive := true;
InsertSQL.Text := ' ';
InsertSQL.Append('execute procedure NewLocation');
InsertSQL.Append
('(:LOCCODE, :LOCNAME, :LOCTYPE , :ADD1, :ADD2, :CITY,');
InsertSQL.Append
(':PROV, :ZIP , :PHONE, :FAX , :AUX, :CONTACT, :EMAIL , :COMMENTS , :N
OTE );');
prepare;
error ==> ParamByName('ADD1').value := 'testing';
open;
insert;
end;
I tried Prepare, and defined the params property in the query, also
removed the suspend in the stored procedure, same error. Is it possible
that insertSQL does not take parameters, using paramByName?
Would someone know the answer to this. How can I pass a parameter to
InsertSql?
the code below did not work.
Thanks
Daniel
Error message:
"FieldName "ADD1" not found"
Procedure:
with DataM.AllLoc do
begin
ReadOnly := False;
RequestLive := true;
InsertSQL.Text := ' ';
InsertSQL.Append('execute procedure NewLocation');
InsertSQL.Append
('(:LOCCODE, :LOCNAME, :LOCTYPE , :ADD1, :ADD2, :CITY,');
InsertSQL.Append
(':PROV, :ZIP , :PHONE, :FAX , :AUX, :CONTACT, :EMAIL , :COMMENTS , :N
OTE );');
prepare;
error ==> ParamByName('ADD1').value := 'testing';
open;
insert;
end;
>>> torin@... 02/23/04 11:47 AM >>>