From: r_d_cotton <rod...@cl...> - 2003-08-05 10:48:45
|
Hi, I've been looking at Firebird and the .net provider for a couple of days, everything was going fine until I tried to return multiple rows from a stored procedure. Here is the code for the procedure... SET TERM ^ ; ALTER PROCEDURE USP_PMI_GETPOLICYLIST RETURNS ( P_POLICYID NUMERIC(18,0), P_POLICY VARCHAR(250)) AS begin FOR SELECT POLICYID, POLICY FROM pmi_policy INTO :P_POLICYID, :P_POLICY DO suspend; end ^ SET TERM ; ^ When I run the procedure from within IB Expert with... select P_POLICYID, P_POLICY from usp_pmi_getpolicylist I get six rows displayed. However when I execute the stored procedure using... FbConnection connection = new FbConnection(mConnectionString); connection.Open(); FbCommand command = new FbCommand( "SELECT P_POLICYID, P_POLICY FROM usp_pmi_GetPolicyList", connection, connection.BeginTransaction()); command.CommandType = System.Data.CommandType.StoredProcedure; FbDataAdapter da = new FbDataAdapter(command); DataSet ds = new DataSet(); da.Fill(ds); connection.Close(); I get the exception "multiple rows in singleton select" Can anyone tell me what I'm doing wrong? Thanks Rod. |