From: Alessandro P. <pet...@in...> - 2004-03-10 12:35:38
|
Hello Carlos, latest changes breaks 1.5 stability. If I try to fill a dataset with an empty result set (using a stored procedure), the following exception occurs: [NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.] FirebirdSql.Data.Firebird.FbDataReader.Read() +67 FirebirdSql.Data.Firebird.FbDataReader.Close() +44 FirebirdSql.Data.Firebird.FbDataReader.Dispose(Boolean disposing) +23 FirebirdSql.Data.Firebird.FbDataReader.System.IDisposable.Dispose() +17 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 My code: FbCommand cmd = new FbCommand("SP_COUNTRY_LIST", conn); cmd.CommandType = CommandType.StoredProcedure; FbDataAdapter adapter = new FbDataAdapter(); DataSet ds = new DataSet(); adapter.SelectCommand = cmd; adapter.Fill(ds); adapter.Dispose(); cmd.Dispose(); conn.Close(); conn.Dispose(); -- Alessandro Petrelli. |