E
Ed Eichman
Hi Guys,
I just figured out how to rename an MSAccess table, and thought I'd
post the info. Basic idea scrounged from
http://www.4guysfromrolla.com/webtech/tips/t030802-1.shtml and
http://www.codeguru.com/vb_database/CreateMSAccess.html
ADODB.Connection adodbConn = new ADODB.Connection ();
adodbConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
strFileName, "", "", 0);
ADOX.Catalog db = new ADOX.Catalog ();
db.ActiveConnection = adodbConn;
foreach (ADOX.Table tbl in db.Tables) {
if (tbl.Name == "tableToRename") {
tblToRename = "newTableName";
break;
}
}
HTH,
Ed Eichman
Rocinante Software S.L. (www dot rocinantesoftware dot com)
Cambrils, Spain
I just figured out how to rename an MSAccess table, and thought I'd
post the info. Basic idea scrounged from
http://www.4guysfromrolla.com/webtech/tips/t030802-1.shtml and
http://www.codeguru.com/vb_database/CreateMSAccess.html
ADODB.Connection adodbConn = new ADODB.Connection ();
adodbConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" +
strFileName, "", "", 0);
ADOX.Catalog db = new ADOX.Catalog ();
db.ActiveConnection = adodbConn;
foreach (ADOX.Table tbl in db.Tables) {
if (tbl.Name == "tableToRename") {
tblToRename = "newTableName";
break;
}
}
HTH,
Ed Eichman
Rocinante Software S.L. (www dot rocinantesoftware dot com)
Cambrils, Spain