I have a table called Media with an Media column of type BLOB and a
Annotation column of type BLOB. The Annotation column can be null. In my
Winform application, I have a dataset for this table and the Media and
Annotation columns are defined as System.Byte. When I fill the dataset, I
am getting an error if the first record has a null Annotation but I don't
get the error if the first record has non-null Annotation value. When it is
null, the Sql.Data.Sqlite Fill method returns a SourceColumn type of Object
instead of System.Byte and therefore gets a type mismatch. If I make that
nullable Annotation column a System.Object in the dataset, it works unless
the first record read has a non-null Annotation value and then I get a type
mismatch between the SourceColumn and the DataColumn.
Is there a way to force a System.Byte for the SourceColumn even if the
value of the first record is Null?