Stored Proc error
Posted: Thu 14 Apr 2005 09:22
I use the following function to run a stored proc :
function ExecSp(ProcName : string; InParamsValues: Variant) : Variant;
var
Id : integer;
begin
Result:=Null;
with DM_B.MSStoredProc do
begin
while Executing do
Application.ProcessMessages;
if Prepared then
UnPrepare;
Params.Clear;
Close;
StoredProcName:=ProcName;
// initialiser les parametres en entrée
for Id:=0 to Params.Count-2 do
Params[Id + 1].Value:=InParamsValues[Id];
try
Prepare;
ExecProc;
Result:=Params[0].Value;
finally
if Prepared then
UnPrepare;
Close;
Params.Clear;
StoredProcName:='';
end;
end;
end;
Sommetimes when I call the function
I have the error message " Le connexion est utilisée par les resultat d'une autre commande"
What does it mean ??
Pascal
function ExecSp(ProcName : string; InParamsValues: Variant) : Variant;
var
Id : integer;
begin
Result:=Null;
with DM_B.MSStoredProc do
begin
while Executing do
Application.ProcessMessages;
if Prepared then
UnPrepare;
Params.Clear;
Close;
StoredProcName:=ProcName;
// initialiser les parametres en entrée
for Id:=0 to Params.Count-2 do
Params[Id + 1].Value:=InParamsValues[Id];
try
Prepare;
ExecProc;
Result:=Params[0].Value;
finally
if Prepared then
UnPrepare;
Close;
Params.Clear;
StoredProcName:='';
end;
end;
end;
Sommetimes when I call the function
I have the error message " Le connexion est utilisée par les resultat d'une autre commande"
What does it mean ??
Pascal