Stored procedure

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
nostoc
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 22.03.2007, 18:03

Stored procedure

Post 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 :cry:
noel
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 28.09.2007, 09:30

Post 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.
Post Reply