質問

私は、VisualフォックスProのデータベース内のテーブルのリストを取得する必要があります。 (7.0)これは私がやっているものです....しかし、それは働いていないか、私は右のそれをやっていないよ...

DataFactory dataFactory = new DataFactory();

dataFactory.CreateOldStarbaseConnection();
dataFactory.OpenOldStarbaseConnection();
OleDbConnection oldStarbaseConnection = dataFactory.OldStarbaseConnection;

object[] arrRestrict = new object[] { null, null, "NewStarbase", null };

// Get the tables in the new Database
DataTable tblDbSchema = newStarbaseConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, arrRestrict);

// for each table in the new database
foreach (DataRow myDataRow in tblDbSchema.Rows)
{}
scroll top