Home > Back-end >  SQLStoredProc1 how to call stored procedures in the package?
SQLStoredProc1 how to call stored procedures in the package?

Time:09-25

If the stored procedure is not in your bag, run OK,
 with SQLStoredProc1 do 
The begin
Active:=False;
Params. The Clear;
StoredProcName:='Test2';
Params. CreateParam (ftString, 'p_no ptInput);
Params. CreateParam (ftString, 'p_user ptInput);
//out
Params. CreateParam (ftString, 'p_result ptOutput);

ParamByName (' p_no). AsString:=edt_no. Text;
ParamByName (' p_user). AsString:=edt_user. Text;
ExecProc;
ShowMessage (ParamByName (' p_result) AsString) are identical.


If the process on PG_AS bag and run error: not parse SQL
 with SQLStoredProc1 do 
The begin
Active:=False;
Params. The Clear;
StoredProcName:='PG_AS. Test2';
Params. CreateParam (ftString, 'p_no ptInput);
Params. CreateParam (ftString, 'p_user ptInput);
//out
Params. CreateParam (ftString, 'p_result ptOutput);

ParamByName (' p_no). AsString:=edt_no. Text;
ParamByName (' p_user). AsString:=edt_user. Text;
ExecProc;
ShowMessage (ParamByName (' p_result) AsString) are identical.


Younger brother just learning Delphi for a month, grammar are not ripe ah, call packages is not "package name. The process name" yao... O great god teach
  • Related