Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8993953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:18:37+00:00 2026-06-15T23:18:37+00:00

I am developing a desktop application in vb.net for student details management. In that

  • 0

I am developing a desktop application in vb.net for student details management.

In that I want to add feature of backup and restore the data. By using this feature user should be able to take data backup and when he wants he should be able to restore data again (if system crash occurs) so data will not be lost.

How to do that using vb.net code, I am using VS2008.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:18:39+00:00Added an answer on June 15, 2026 at 11:18 pm

    You can execute BACKUP & RESTORE commands just the same way as any other via vb.net, so something like this would do it…

    Dim sqlConn As New SqlConnection("Data Source=(local);Initial Catalog=master;User ID=sa;Trusted_Connection=true")
    
    sqlConn.Open()
    
    Dim sCommand = "BACKUP DATABASE [YourDatabaseName] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\Backup.bak' WITH COPY_ONLY"
    
    Using sqlCmd As New SqlCommand(sCommand, sqlConn)
        sqlCmd.ExecuteNonQuery()
    End Using
    

    Where obviously your database name would replace [YourDatabaseName]. The equivalent RESTORE command would be something like this…

    sCommand = "RESTORE DATABASE [YourDatabaseName] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\TestBackup.bak' WITH REPLACE"
    
    Using sqlCmd As New SqlCommand(sCommand, sqlConn)
        sqlCmd.ExecuteNonQuery()
    End Using
    

    You would need to review the documentation for these commands to tailor them to your specific scenario.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing desktop application using vb.net and vs2008. I have a DropDownList that
I am developing a desktop application for pdf file management using C#. When I
I am developing a Java Desktop Application and want a light database that can
I'm developing a desktop application with .NET. I'd like to save some data into
I am relatively new to C#/.Net. I'm developing a desktop application that requires multi
We are developing a desktop application using Java Swing that requires to show width
I am developing Desktop application using c#.net and MySql. Is there any solution to
I am developing a small desktop application using C#.NET and MS-Access . I don't
I'm developing a small desktop application using python. I want it to be multi
We have a dilemma; developing desktop application using Matisse or Jigloo.. Matisse has this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.