[Mono-devel-list] DataRow.SetValuesFromDataRecord problem

Carlos G.A. carlosag at telefonica.net
Fri Jun 11 10:27:14 EDT 2004


I'm making some tests of an issue reported for a user
of the Firebird .NET provider.

The problem gives filling datasets, after some debugging, the
problem seems to be in the DataRow.SetValuesFromDataRecord that
is making a call to column.DataContainer.SetItemFromDataRecord, 
in my sample, that will call to
Int16DataContainer.SetItemFromDataRecord, that will do a call to the
IDataReader.GetIn16 method *without* check for nulls, a comment in that
method tells that caller should handle the exceptions but
DataRow.SetValuesFromDataRecord isn't doing that.

I think the DataRow.SetValuesFromDataRecord should be fixed for call the
IDataReader.IsDBNull method or check if a conversion exception is
thrown, and fill the column with DBNUll.Value in that case.

Am i right ?? :)

(Thew same sample program works fine in .NET)

Best regards

Carlos Guzmán Álvarez

More information about the Mono-devel-list mailing list