Index: System.Data.SQLite/SQLiteConvert.cs ================================================================== --- System.Data.SQLite/SQLiteConvert.cs +++ System.Data.SQLite/SQLiteConvert.cs @@ -579,11 +579,11 @@ typeof(object), // Uninitialized (0) typeof(Int64), // Int64 (1) typeof(Double), // Double (2) typeof(string), // Text (3) typeof(byte[]), // Blob (4) - typeof(DBNull), // Null (5) + typeof(object), // Null (5) typeof(DateTime), // DateTime (10) typeof(object) // None (11) }; /// ADDED Tests/tkt-48a6b8e4ca.eagle Index: Tests/tkt-48a6b8e4ca.eagle ================================================================== --- /dev/null +++ Tests/tkt-48a6b8e4ca.eagle @@ -0,0 +1,88 @@ +############################################################################### +# +# tkt-48a6b8e4ca.eagle -- +# +# Written by Joe Mistachkin. +# Released to the public domain, use at your own risk! +# +############################################################################### + +package require Eagle +package require Eagle.Library +package require Eagle.Test + +runTestPrologue + +############################################################################### + +package require System.Data.SQLite.Test +runSQLiteTestPrologue + +############################################################################### + +runTest {test tkt-48a6b8e4ca-1.1 {SQLiteTypeToType with NULL values} -setup { + setupDb [set fileName tkt-48a6b8e4ca-1.1.db] +} -body { + set id [object invoke Interpreter.GetActive NextId] + set dataSource [file join [getDatabaseDirectory] $fileName] + + sql execute $db { + CREATE TABLE t1(x); + } + + set sql { \ + PRAGMA table_info(t1); \ + } + + unset -nocomplain results errors + + set code [compileCSharpWith [subst { + using System.Data; + using System.Data.SQLite; + + namespace _Dynamic${id} + { + public static class Test${id} + { + public static void Main() + { + using (SQLiteConnection connection = new SQLiteConnection( + "Data Source=${dataSource};")) + { + connection.Open(); + + using (SQLiteCommand command = new SQLiteCommand("${sql}", + connection)) + { + using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter( + command)) + { + using (DataSet dataSet = new DataSet()) + { + dataAdapter.Fill(dataSet); + } + } + } + } + } + } + } + }] true true true results errors System.Data.SQLite.dll] + + list $code $results \ + [expr {[info exists errors] ? $errors : ""}] \ + [expr {$code eq "Ok" ? [catch { + object invoke _Dynamic${id}.Test${id} Main + } result] : [set result ""]}] $result +} -cleanup { + cleanupDb $fileName + + unset -nocomplain result code results errors sql dataSource id db fileName +} -constraints \ +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ +regexp -result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\}$}} + +############################################################################### + +runSQLiteTestEpilogue +runTestEpilogue