Subject help with stored procedures
Author newgen3152003
Hi,

Could someone help me, with this please. My code to insert a row
below gives me an error with parambyname. what am I doing wrong. I
get this error no matter which field I use. the stored procedure
included below.

Could someone please set me straight on the proper usage params and
stored procedures, if this is not correct.

Please
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 );');

error ==> ParamByName('ADD1').value := 'testing';

open;
insert;
end;

Stored Procedure:
IDLOC created in a trigger and generator

begin
insert into LOCATIONS
(LOCCODE,LOCNAME,LOCTYPE ,ADD1,ADD2,CITY,PROV, ZIP , PHONE, FAX ,
AUX, CONTACT, EMAIL , COMMENTS , NOTE )
values

(:LOCCODE, :LOCNAME, :LOCTYPE , :ADD1, :ADD2, :CITY, :PROV, :ZIP , :PH
ONE, :FAX , :AUX, :CONTACT, :EMAIL , :COMMENTS , :NOTE );
suspend;
end

table structure
CREATE TABLE LOCATIONS (
IDLOC INTEGER NOT NULL
, LOCCODE VARCHAR( 8 )
, LOCNAME VARCHAR( 35 )
, LOCTYPE VARCHAR( 25 )
, ADD1 VARCHAR( 35 )
, ADD2 VARCHAR( 35 )
, CITY VARCHAR( 25 )
, PROV VARCHAR( 8 )
, ZIP VARCHAR( 10 )
, PHONE VARCHAR( 15 )
, FAX VARCHAR( 15 )
, AUX VARCHAR( 15 )
, CONTACT VARCHAR( 35 )
, EMAIL VARCHAR( 35 )
, COMMENTS VARCHAR( 50 )
, NOTE BLOB( 65535, 0 )
, CONSTRAINT INTEG_24
PRIMARY KEY ( IDLOC )
)