Hi, I am needing to convert a large amount of SQL queries into stored procedures. I have some code that updates about 20 or 30 values at one time in one Delphi procedure. I can handle creating a stored procedures to do such a thing. The problem is my way to pass parameters to stored procedures is very bulky like this:
with stored_procedure do......
Param := Parameters.AddParameter;
Param.Name := '@SSN';
Param.Value := edtSSN.text;
Param := Parameters.AddParameter;
Param.Name := '@FirstName';
Param.Value := edtFirstName.Text;
Param := Parameters.AddParameter;
Param.Name := '@LastName';
Param.Value := edtLastName.Text;
Param := Parameters.AddParameter;
Param.Name := '@UserRID';
Param.Value:= GetRIDFromCombo(cbUser);
I also am not sure if that causes a memory leak(is it necessary to free such TParameter objects?)
Anyone have a better way of handling a large amount of parameters? (I can not use a new library. I must use ADO, and the SQL I use is MSSQL) (also, I'm NOT using ADO.net)