Create MyStoredProc at runtime What`s is Wrong ?
Posted: Fri 08 Aug 2008 13:20
Var proc :tMyStoredProc;
begin
Try
Screen.Cursor :=crHourGlass;
Proc := TmyStoredProc.Create(self);
Proc.Connection := MyConnection1;
Proc.StoredProcName := 'H_CALC';
Proc.Params[0].asString := 'WO000345'
Proc.Prepare;
Proc.ExecProc;
Finally
Proc.Free;
Screen.Cursor := crDefault;
End;
If assign to tMyStoredProc Components all is Ok but if I assign StoredProcName at runtime nothing
to execute. Why?
begin
Try
Screen.Cursor :=crHourGlass;
Proc := TmyStoredProc.Create(self);
Proc.Connection := MyConnection1;
Proc.StoredProcName := 'H_CALC';
Proc.Params[0].asString := 'WO000345'
Proc.Prepare;
Proc.ExecProc;
Finally
Proc.Free;
Screen.Cursor := crDefault;
End;
If assign to tMyStoredProc Components all is Ok but if I assign StoredProcName at runtime nothing