vendredi 6 mars 2015

How to dynamically find the C# CLR types of columns from an SQLite database using System.Data.Sqlite?

I'm looking for a more elegant way of accomplishing this than writing a dummy row to the database, reading it back (thus getting all CLR types) and then deleting the row. I also do not want to hardcode the types via a giant switch since I'd like to allow for the possibilities of easily changing my SQLite provider or the provider themselves changing their CLR type associations.


To be clear something like PRAGMA table_info(..) isn't appropriate here since I'm looking for the CLR types, not the SQLite types.


Aucun commentaire:

Enregistrer un commentaire