save a table under different name

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

How could I save a table under a different name (without
opening it) from VB to have a copy of the existing table.

Thanks
 
How could I save a table under a different name
from VB to have a copy of the existing table.


strSQL = "COPY * " & _
"INTO NewTable " & _
"FROM OldTable "

db.Execute strSQL, dbFailOnError


Strictly speaking, this does not copy the whole object because some
properties like Autoincrement(?), DefaultValue, Required and so on do not
get propagated. Nevertheless, these are not necessary for backing up data,
and there is barely any reason for copying a whole table otherwise.

HTH



Tim F
 
Back
Top