Backup a database table

P

peashoe

I need to be able to add a button on my site that will backup an SQL
table (not the whole database) - does anyone know how to do that?

Thanks in advance
Lisa
 
E

Evertjan.

Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:
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
"
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.
 
E

Evertjan.

Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:
This group has been top posting since I can remember (many years). I
prefer top posting.

Are you responding to something, Jon? Quoting is there for a reason.

And this group has not been topposting in a majority of the posts for as
far as I can remember.
Top posting prevents having to scroll down through a hundred lines of
history

No it does not. It only would if senseless topposting would be the only
alternative senseless bottomposting, but the sensible alternative pointed
to in Netiquette is sparce interposting, not senseless bottomposting.
to see a final closing comment and since this is a
threaded discussion it makes good since to top post.

I hope you mean sense?

No it does not on usenet, Jon, since the nature of usenet prevents the
certainty that the post you are replying on is already on the local news
server, or is stil on the same. Netiquette is there for a reason also in
this case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top