Retriving Metadata from Forxpro8.0
1- DataTable dcolumn = this.connection.GetOleDbSchemaTable(
OleDbSchemaGuid.Columns,
new object[] { null, null, tablename});
2- DataTable dcolumn = this.connection.GetSchema(OleDbMetaDataCollectionNames.Columns,
new string[] { null, null, tablename });
These are the two methods via which I am getting the "column" meta data but the problem is the column's datatype which is an Oid. I need a DB string representation like varchar, int, char etc.
Based on this metadata I need to create schema on sqlserver on the fly.
The below method gives me "System.Int32" and so on string representations but I don't want to go with this.
3- OleDbCommand cmd = new OleDbCommand("select * from "+tablename, this.connection);
OleDbDataReader reader = cmd.ExecuteReader();
I want to go with the first approach but with DB datatypes.
Thanks,
Nauman

