5 replies
by andrew
Here's a way using the ADOX Library:
Dim oCon 'As ADODB.Connection
Dim oCatalog 'As ADOX.Catalog
Dim oTable 'As ADOX.Table
Set oCon = Server.CreateObject("ADODB.Connection")
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\File.mdb;"
Set oCatalog = Server.CreateObject("ADOX.Catalog")
Set oCatalog.ActiveConnection = oCon
Set oTable = oCatalog.Tables("OldTable")
oTable.Name = "NewTable"
oCon.Close
by anbusudar
by andrew
Trying to do this enirely from SQL is difficult.
A query like:
UPDATE MSysObjects SET MSysObjects.Name = 'TableNew'
WHERE (((MSysObjects.Id)=44));
Runs into permission problems, and modifying the system table can be tricky.
SQL Server provides a system stored procedure for object renaming, but its over 400 lines long.
by anbusudar
by anbusudar
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending