Page 1 of 1
Stored procedure
Posted: 22.03.2007, 19:38
by nostoc
Is there any one can help (show) me how to get recordsets (2 or more recordset) from stored procedure ?
Usualy (?) I'm using ADO.
Thank you, sorry for bad english
Posted: 02.10.2007, 18:54
by noel
What do you mean by 2 or more (recordsets or rows in recordset) ??
Using Lazarus IDE in MS Windows you just need to execute stored procedure as a query:
Code: Select all
begin
ZConnection1.Connect;
if ZConnection1.Connected = true then
begin
showmessage ('Zeo cnn OK!!');
ZQuery1.Close;
ZQuery1.SQL.Clear;
ZQuery1.SQL.Append('EXEC yours_stored_procedure');
ZQuery1.Open;
while not ZQuery1.EOF do
begin
showmessage(ZQuery1.FieldByName('name').AsString);
ZQuery1.Next;
end;
end
end;
of course ZConnection1 and ZQuery1 must be properly connfigured (using object properities in IDE) - I'using mssql Protocol - not ADO.