Stored procedure

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

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

Stored procedure

Postby nostoc » 22.03.2007, 19:38

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

Postby noel » 02.10.2007, 18:54

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.


Return to “MS SQL Server”

Who is online

Users browsing this forum: No registered users and 1 guest