Page 1 of 1

Migration from ADO to SDAC.

Posted: Wed 10 Jun 2009 06:07
by Saupg
Hello!

I have such code:

Code: Select all

var
  spOper: TADOStoredProc;
begin
  ....
  spOper.ProcedureName := ProcName;
  if spOper.Parameters.Refresh then
    spOper.Parameters.ParamByName('Param').Value := AValue;
  else
    Exception.CreateFmt('Stored proc ''%s'' not found', [ProcName]);
How i can rewrite it using SDAC? I need to check stored proc.

Posted: Wed 10 Jun 2009 13:31
by Dimon
You can't know if the procedure exist until you try to execute it, using, for example, the ExecProc method.
If you need to get list stored procedure names you should use the TMSConnection.GetStoredProcNames method.