I want to get a database schema (dBase), so I use "oledb" to get data from a dbase file for using getchemaTable to get the schema of data, but the "ColumnSize" of the numeric data type excludes "19". As the original data, such as "object_id" Type: nummeric column size: 12, but it returns the output to "19".
I want to show the results to the exact same. but.. I don't know what to do next.
public static DataSet getStructureDBF(string dir, string input)
{
OleDbConnection objConn = new OleDbConnection(@"Provider=VFPOLEDB.1;Data Source=" + dir + ";Persist Security Info=False;");
objConn.Open();
OleDbCommand objCmd = new OleDbCommand("Select * from " + input, objConn);
OleDbDataReader objDataReader = objCmd.ExecuteReader();
DataTable schemaTable = objDataReader.GetSchemaTable();
DataSet dsnew = new DataSet();
dsnew.Tables.Add(schemaTable);
return dsnew;
}
varchar
or the like, will have that size of 19. If that's the case, it seems a slightly odd choice. – jmcilhinney