View Ticket
Not logged in
Ticket Hash: 49e30d76126fb32ad22333e4b6363400fcff4b46
Title: Error with NULL columns
Status: Closed Type: Code_Defect
Severity: Important Priority: Medium
Subsystem: Db_Type_Conversion Resolution: Duplicate
Last Modified: 2013-04-29 23:03:36
Version Found In: 1.0.85
User Comments:
anonymous added on 2013-04-27 20:49:25: (text/x-fossil-plain)
A query like "SELECT *, NULL AS C1 FROM T1;" returns an error "DataException: Invalid storage type: DBNull"

So a query like "SELECT T1.* FROM T1 LEFT JOIN (SELECT C1, Max(C2) AS C2_Max FROM T2 GROUP BY C1) T3 ON T1.C1 = T3.C1;" returns the same error if T2 has no record, because "(SELECT C1, Max(C2) AS C2_Max FROM T2 GROUP BY C1)" is null

My code in
Dim oCommand As New SQLiteCommand(stSQL)
Dim oDataAdapter As New SQLiteDataAdapter(oCommand)
oCommand.Connection() = oConnection
oDataAdapter.Fill(oDataset, stTableDTS)     '=> Error

I used the package, It's ok with the previous version 1.0.84

mistachkin added on 2013-04-29 20:14:19: (text/x-fossil-plain)
Would it be possible to see the full schema for the tables involved in this query?

mistachkin added on 2013-04-29 20:41:42: (text/x-fossil-plain)
It seems to me that the query "SELECT *, NULL AS C1 FROM T1;" should consider
the "type" of column C1 to be DBNull.Value.  Am I missing something here?

mistachkin added on 2013-04-29 22:27:23: (text/x-fossil-plain)
This issue appears to be related to ticket [48a6b8e4ca].

mistachkin added on 2013-04-29 23:03:36: (text/x-fossil-plain)
Preliminary fix checked-in on trunk [dcc277f29a].

Is it possible for you to verify that this fixes the issue seen in your 

Closing this ticket as 'duplicate'.  Further comments on this issue should be
added to ticket [48a6b8e4ca] instead of this one.