Thank you Adam, it works very well.
I only had to make a minor change to retrive the NativeType and the DbType (with more time I'll try to get size, precision and scale).
This is the code I changed:
private DbType DbTypeFromType(string p)
{
//SQLite has only a few types:
// INTEGER == Int64
// NUMERIC == Decimal
// TEXT == String
// NONE == Object or Blob
switch (p)
{
//case "System.Int64": //Change 9/9/06
case "INTEGER": //Change 9/9/06
return DbType.Int64;
//case "System.Decimal": //Change 9/9/06
case "REAL": //Change 9/9/06
return DbType.Decimal;
//case "System.String": //Change 9/9/06
case "TEXT": //Change 9/9/06
return DbType.String;
default:
return DbType.Object;
}
}
private string NativeTypeFromType(string p)
{
//SQLite has only a few types:
// INTEGER == Int64
// NUMERIC == Decimal
// TEXT == String
// NONE == Object or Blob
return p; //Change 9/9/06
//switch (p) //Change 9/9/06
//{ //Change 9/9/06
// case "System.Int64": //Change 9/9/06
// return "INTEGER"; //Change 9/9/06
// case "System.Decimal": //Change 9/9/06
// return "NUMERIC"; //Change 9/9/06
// case "System.String": //Change 9/9/06
// return "TEXT"; //Change 9/9/06
// default: //Change 9/9/06
// return "NONE"; //Change 9/9/06
//} //Change 9/9/06
}