Using the latest version of the repo, and changing the sample code to the following
command.CommandText = "CREATE TABLE integers(foo text, bar INTEGER);";
var executeNonQuery = command.ExecuteNonQuery();
command.CommandText = "INSERT INTO integers VALUES ('3', 4), ('5', 6), ('7', NULL);";
and PrintQueryResults changed to
if (queryResult.GetFieldType(ordinal) == typeof(string))
{
var sval = queryResult.GetString(ordinal);
Console.Write(sval);
}
else
{
var val = queryResult.GetInt32(ordinal);
Console.Write(val);
}
I get the unrecognized type error.
But if I change the DuckDBType enum to
DuckdbTypeVarchar = 17
then it works. This error existed on the previous version but the latest version of DuckDB.Net was released before I was finished investigating. Note that on the previous version the required value to get it work was 20, not 17. Does this mean that extra types should be inserted in the enum to get it up to at least 17?
Using the latest version of the repo, and changing the sample code to the following
and
PrintQueryResults
changed toI get the unrecognized type error.
But if I change the
DuckDBType
enum tothen it works. This error existed on the previous version but the latest version of DuckDB.Net was released before I was finished investigating. Note that on the previous version the required value to get it work was 20, not 17. Does this mean that extra types should be inserted in the enum to get it up to at least 17?