ACCESS database does not support directly using SQL statements to change table names or field names, but can be implemented as ADOX objects. The example code is as follows:
Copy the code as follows: <%
CallRenameTable("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:/example.mdb","test","changed")
SubRenameTable(conStr,oldName,newName)
'HastobeOLEDBconnection
'CreateobjectandconnecttoDB...
DimobjADOXDatabase
SetobjADOXDatabase=Server.CreateObject("ADOX.Catalog")
objADOXDatabase.ActiveConnection=conStr
'Changethename...
objADOXDatabase.Tables(oldName).Name=newName
'Cleanup...
SetobjADOXDatabase=Nothing
EndSub
%>