日期:2010-11-15  浏览次数:20928 次

下面代码是用Adox重命名Access表名的示例代码:
Dim Conn,ConnStr,oCat,oTbl
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("data.mdb")
Set oCat=Server.CreateObject("ADOX.Catalog")
oCat.ActiveConnection = ConnStr

Set oTbl = Server.CreateObject("ADOX.Table")
Set oTbl = oCat.Tables("OldTable") '要重命名的表名:OldTable
oTbl.Name = "NewTable" '新表名
Set oCat = Nothing
Set oTbl = Nothing