STable="aa" 'source table
TTable="bb" 'new table, it is necessary to create
Set the rs=Server. CreateObject (" ADODB. You ")
'SQL="Select * Into" & amp; TTable&" From "& amp; STable
'SQL="Select top 0 * Into" & amp; TTable&" From "& amp; STable
'SQL="create table" & amp; TTable&" As select * from "& amp; STable
SQL=sql&" Where 1=0 "
Rs. The open SQL, conn, 1, 1
Rs. Update
Rs. Close
Set the rs=nothing
%>
Is the access database, connection file is conn. Inc, there is no problem
CodePudding user response:
Two table structure? I have been a table of data backup to two table structureCodePudding user response:
1 don't return the records set does not need to use the rs, directly conn. Execute SQL2 to create a table structure should use ADOX objects (ADO Extensions for DDL and Security)
CodePudding user response:
# 2Table structure for "aa" copied from the source table
CodePudding user response:
# 3Using conn. Execute SQL also tested, but also pass it!