OleDbConnection con;
OleDbCommand cmd;
OleDbDataReader reader;
con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=D:\\SampleDB.mdb;" + "Jet OLEDB:Engine Type=5");
con.Open();
DataTable schemaTable = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[]{null, null, null, "TABLE"});
for (int y = 0; y < schemaTable.Rows.Count; y++)
listBox1.Items.Add(schemaTable.Rows[y][2].ToString());
con.Close();
Wednesday, February 3, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment