Searching for many days on a fix to the dreaded DATETIME mapping to .NET.
Of course SQLite technically does not have a datetime per-say as I clearly
understand but the problem remains with dates such as Mac absolute and also
Java datetimes.  The fun "string cannot be converted to string" is what I
receive in return from .NET mapping on FILL to a datatable or dataset.

I have tried:

Connection string including FLAG: 256 - GetAlllAsText but this throws error
on System.Byte[] columns obviously.

Connection string including DateTimeFormat=UnixEpoch which works (does not
throw the exception) but of course Mac Absolute and Java times are
incorrectly displayed to the user in the datagridview.

Connection string including DateTimeFormat=Ticks which also works (no
exception) on most but all dates are 01/01/0001 which is expected.

This is the problem I have.  The databases my application is dealing with
are not created by my application so I cannot control the format (e.g.,
unix times, mac absolute, java, webkit) so a connection string specific
DateTimeFormat would not work for each situation.

Is there a way on connection to use a flag to GetAllAsTextIfDateTime ?
That would most certainly work because I can then use my other methods to
convert the string date time to its correct format after reading from the
database.  As it is now, it cannot be extracted from the db without
exception or incorrect formatting.

Thank you

Reply via email to