Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:
>is this the wrong way to do this??
You should respond to "peashoe"
[Please do not toppost on usenet]
This is usenet, so one responds to the group, Jon. ;-)
>strSQL = "select [field names] into [backup table name] from [table
name]" conn.execute (strSQL)
then you can just have a link or a form button that goes to that
page??
if you plan on making a regular backup, you would have to have
strSQL = "drop table [backup name]"
conn.execute (strSQL)
I think, though I did not test, this is a very nice way to do it.
Perhaps having a small pile of backups could be even safer:
strSQL = "drop table [backup3]"
conn.execute strSQL
strSQL = "select * into [backup3] from [backup2]"
conn.execute strSQL
strSQL = "drop table [backup2]"
conn.execute strSQL
strSQL = "select * into [backup2] from [backup1]"
conn.execute strSQL
strSQL = "drop table [backup1]"
conn.execute strSQL
strSQL = "select * into [backup1] from [table]"
conn.execute strSQL
or perhaps more efficient, work with a ring of backup tables and a
'mostRecentBackup' pointer in a seperate small table that could also
accomodate the datetime of each backup.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)