Subject insertSQL
Author newgen3152003
Hi all,
Could someone please tell me how I should "hard code" these 4
parameters into my insertSQL? I tried paramByName and it does not
work with insertSql, How can I replace the parameters with variables
directly? How can I assign a value to the parameter?

Please someone can help me with this?
Daniel

with DataM.Spares do
begin
ReadOnly := False;
InsertSQL.Text := ' ';
InsertSQL.Append('execute procedure NewSpare');
InsertSQL.Append
('(:IDSPARE,:TRACKNO,:AXPOS,:IDVEH,:TIREPOS,:IDLOC,:IDINV,:INVNUM,:INV
TYPE ,:INVDATE,:IDREPS ,');
InsertSQL.Append
(':VEHCODE,:VEHMODEL, :LOCCODE , :LOCNAME ,:IDTIRE ,:MANCODE, :MANNAME
,');
InsertSQL.Append
(':MANMODEL,:TIRESIZE ,:TIREPLY ,:PATTERN ,:THREAD ,:DEPTH ,:ACDATE,:T
IRECOST , :SOLD,:JUNK ,:ITEM ,');
InsertSQL.Append
(':STATUS , :WARRANTY ,:WARSTART , :WAREND ,:WARTYPE, :COMMENTS, :NOTE
);');

if not prepared then prepare;
paramByName( ':INVNUM').AsInteger :=
DataM.InvoicesIDINV.AsInteger;
paramByName( ':INVNUM').Asstring :=
DataM.InvoicesINVNUM.AsString;
paramByName( ':INVTYPE').Asstring := 'Invoice';
paramByName( ':INVDATE').AsDateTime :=
DataM.InvoicesINVDATE.AsDateTime;

open;
insert;
end; // with dataM.Spares