Backup a database table
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Backup a database table




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Backup a database table  
peashoe


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-26-07 06:19 PM

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






[ Post a follow-up to this message ]



    Re: Backup a database table  
Jon Paal [MSMD]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-26-07 06:19 PM


do a table dump

http://www.databasejournal.com/feat...cle.php/2206571



"peashoe" <peashoe@yahoo.com> wrote in message news:1174926235.893444.318790@b75g2000hsg.goo
glegroups.com...
>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
>







[ Post a follow-up to this message ]



    Re: Backup a database table  
Jeff


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 12:25 AM


"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in messag
e
news:130fulbfe04b0aa@corp.supernews.com...
>
> do a table dump
>
> http://www.databasejournal.com/feat...cle.php/2206571
>
>
>
> "peashoe" <peashoe@yahoo.com> wrote in message
> news:1174926235.893444.318790@b75g2000hsg.googlegroups.com... 
>
>

can you make a page called backup.asp

and have a script like.

strSQL = "select [field names] into [backup table name] from [ta
ble 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)

before the copy script.


is this the wrong way to do this??







[ Post a follow-up to this message ]



    Re: Backup a database table  
Jon Paal [MSMD]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 12:25 AM

You should respond to "peashoe"



>
> is this the wrong way to do this??
>







[ Post a follow-up to this message ]



    Re: Backup a database table  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 12:18 PM

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. ;-)
[vbcol=seagreen] 

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)





[ Post a follow-up to this message ]



    Re: Backup a database table  
Jon Paal [MSMD]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-28-07 06:17 PM

This group has been top posting since I can remember (many years).  I prefer
 top posting.

Top posting prevents having to scroll down through a hundred lines of histor
y to see a final closing comment and since this is a
threaded discussion it makes good since to top post.









[ Post a follow-up to this message ]



    Re: Backup a database table  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-29-07 12:16 AM

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.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)





[ Post a follow-up to this message ]



    Re: Backup a database table  
Jon Paal [MSMD]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-29-07 12:16 AM

please top post,  it makes it easier for everyone to read...







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:35 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register