From: Mark S. M. <mma...@ho...> - 2003-12-01 00:54:53
|
Hello, I'm trying to retrieve a table of users using the following stored proc: ---------------------- CREATE PROCEDURE SP_BROWSE_USERS RETURNS ( USER_ID VARCHAR(38), SSS VARCHAR(256), NAME_FIRST VARCHAR(50), NAME_MIDDLE VARCHAR(50), NAME_LAST VARCHAR(50), NAME_USER VARCHAR(16), IS_DISABLED CHAR(1)) AS begin for select USER_ID, SSS, NAME_FIRST, NAME_MIDDLE, NAME_LAST, NAME_USER, IS_DISABLED from USERS into :USER_ID, :SSS, :NAME_FIRST, :NAME_MIDDLE, :NAME_LAST, :NAME_USER, :IS_DISABLED do suspend; end -------------------------------------------------------- Now when I tried this in the database, it works just fine. Returns all the records in the table, however, when I use the firebird .net provider using the following code, I always get a single record. --------------------------------------- objConn.Open(); FbTransaction objTrans = objConn.BeginTransaction(); // strCommandText contains the // "EXECUTE PROCEDURE SP_BROWSE_USERS.." string FbCommand objCommand = new FbCommand(strCommandText, this.GetConnection(), objTrans); objCommand.CommandType = CommandType.StoredProcedure; FbDataReader objDR = objCommand.ExecuteReader(); ----------------------------------- That is, once I call the objDR.Read() method, I only get a true value at the first call. Subsequent call always return false, hence I only get one record every time. Any ideas? Mark |