I am using the 10.0.85 version of the Win32 SQLite.NET data adapter to read
a spatialite database table.  This table has a single geometry column in it,
which stores data as a BLOB.  I cannot read the data into a DataTable using
the adapter, because the exception "Invalid storage type: DBNull." is
thrown.
The exception appears to be thrown by the DbDataAdapter base class as a
result of the SQLiteDataAdapter assigning the BLOB column the type of
System.DBNull.  Stepping through the code, I can see in SQLiteConvert.cs the
method SQLiteTypeToType() uses the column's type (Object) and its affinity
(null) to determine the "equivalent" .NET Type as DBNull.  I see that the
lookup array used by SQLiteTypeToType() provides a conversion from affinity
BLOB to Type byte[], which is what is desired here.  However, the SQLite 3
documentation is clear that there is no such affinity - BLOBs are given
affinity "none".  At this point, I am unclear how to read this data using
the SQLiteDataAdapter.
Thanks in advance for any help.
Kevin

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to