Subject Using Params
Author Dion Oliphant
Hi,

I keep getting an access error with the code below. I want to pass
parameters in order to update a table. I have assigned the following SQL to
EditSQL for qryGrades. I think my problem is a BDE mentality!?

Help will be greatyly appreciated.

if not trnGrades.InTransaction then trnGrades.StartTransaction;

try
try

{ The tree is being edited. Try and update the record on the
database. }
qryGrades.Params[0].AsInteger := TNodeTypeData(Node.Data^).Ref;
qryGrades.Params[1].AsString := S;
qryGrades.Open;

if trnGrades.InTransaction then trnGrades.Commit;

except on EIB_ISCError do


{ Don't change the node value to the new value. }
abort;
end;

finally
qryGrades.Close;
end;

Thanks,
Dion.