Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. How To Backup and Resotre .mdf file local database

How To Backup and Resotre .mdf file local database

Scheduled Pinned Locked Moved The Lounge
databasehelptutorial
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11494582
    wrote on last edited by
    #1

    Please can any one tell how to backup and restore .mdf file , currently i am trying some like: SqlCommand cmd = new SqlCommand(@"BACKUP DATABASE [Record] TO DISK ='D:/Backup/main.bak'",con); but error is DATABASE not exist

    M L J Sander RosselS 4 Replies Last reply
    0
    • U User 11494582

      Please can any one tell how to backup and restore .mdf file , currently i am trying some like: SqlCommand cmd = new SqlCommand(@"BACKUP DATABASE [Record] TO DISK ='D:/Backup/main.bak'",con); but error is DATABASE not exist

      M Offline
      M Offline
      MidwestLimey
      wrote on last edited by
      #2

      Now, not everyone's first language is English. However you did post your question in perfectly legible English so I can't give you a free ride there. At the top of the page is the following blurb:

      Quote:

      Technical discussions are encouraged, but click here to ask your programming question.

      So if you'd just delete this post and click on the link at top I'm sure someone will help you with this ...

      062142174041062102

      1 Reply Last reply
      0
      • U User 11494582

        Please can any one tell how to backup and restore .mdf file , currently i am trying some like: SqlCommand cmd = new SqlCommand(@"BACKUP DATABASE [Record] TO DISK ='D:/Backup/main.bak'",con); but error is DATABASE not exist

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        This is the Kentucky Fried Question and your name must be Rex Kramer[^], the danger seeker.

        The language is JavaScript. that of Mordor, which I will not utter here
        This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
        "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

        1 Reply Last reply
        0
        • U User 11494582

          Please can any one tell how to backup and restore .mdf file , currently i am trying some like: SqlCommand cmd = new SqlCommand(@"BACKUP DATABASE [Record] TO DISK ='D:/Backup/main.bak'",con); but error is DATABASE not exist

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          You forgot the USE [Correct_Forum]; statement. That's why.

          Jeremy Falcon

          1 Reply Last reply
          0
          • U User 11494582

            Please can any one tell how to backup and restore .mdf file , currently i am trying some like: SqlCommand cmd = new SqlCommand(@"BACKUP DATABASE [Record] TO DISK ='D:/Backup/main.bak'",con); but error is DATABASE not exist

            Sander RosselS Offline
            Sander RosselS Offline
            Sander Rossel
            wrote on last edited by
            #5

            Member 11528928 wrote:

            but error is DATABASE not exist

            Really? I wonder what your problem might be (besides posting in the wrong forum)... :doh:

            Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

            Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

            Regards, Sander

            G 1 Reply Last reply
            0
            • Sander RosselS Sander Rossel

              Member 11528928 wrote:

              but error is DATABASE not exist

              Really? I wonder what your problem might be (besides posting in the wrong forum)... :doh:

              Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

              Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

              Regards, Sander

              G Offline
              G Offline
              Gittum
              wrote on last edited by
              #6

              May be, it's an impact if using Google Translator..

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups