 |
|
EnterpriseDBDAC
Example: GetStoredProcNames, GetStoredProcParams | | Previous |
Example fills Listview1 items with stored procedures names, input parameters and OID's (overload).
procedure TForm1.GetStoredProcList;
Var SL: TStringList;
PL : TList;
i: integer;
LI: TlistItem;
ParamString: shortstring;
begin
Sl := TStringList.Create;
try
PL := TList.Create;
try
EDBDatabase1.GetStoredProcNames('',SL);
ListView1.Items.BeginUpdate;
ListView1.Clear;
for i:=0 to Sl.Count-1 do
begin
LI := ListView1.Items.Add;
LI.Caption := SL[I];
LI.SubItems.Append(inttostr(integer(SL.Objects[I])));
EDBDatabase1.GetStoredProcParams('',integer(SL.Objects[I]),PL,True);
If Sl.Count>0 then
begin
ParamString := shortstring(PL[0]^);
LI.SubItems.Append('('+ParamString+')');
end;
Application.ProcessMessages;
end;
ListView1.Items.EndUpdate;
finally
Pl.Free;
end;
finally
Sl.Free;
end;
end;
|