使用 AdoX.Catalog重命名access的表
2008年12月11日
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
SQL SERVER 重命名
sp_rename ‘old_name’, ‘new_name’, ‘object’
阅读全文 ]
