How to make a backup from vb.net

  • Thread starter Stan Sainte-Rose
  • Start date
S

Stan Sainte-Rose

Hi,
I would like to add a backup function in my winform app.
I use MSDE.
My idea was to :
Detach the database
Copy the mdf and ldf file to the destination support
Attach the database

But I don't know how to detach and attach the database from vb.net
Any idea ?

Stan
 
W

William Ryan eMVP

sp_Attachdb and detach are the SQL Commands you'd execute against the db.
 

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

Top