Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi all
 
Please tell me how to override an existing database with an updated file using VB.NET.
 
Thank you
Posted 7-Apr-13 22:53pm
Edited 8-Apr-13 0:20am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Dear Friend,
 
In sql server Management Studio.Select one Database Right Click on that.There you will get one Option Task,in that you will get restore option.Click that Restore Option you will get Database.Click that Database there it will open One Window and You will get one Option name Device.It is Radio Button Option.and beside that only there is one button.By clicking that one another Window will Open.In that windows there is Add option Button.By clicking that one you will get one windows.By using that windows you can fetch the .Bak file from the drives.By selecting the back file click ok button.In the last Main Window there is three options.General,Files,Option.In that you take files option.In that Restore as tab is there C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Bank.mdf change Bank.mdf to your current database filename.Same thing should change in fileType log also.and last there is options button.By selecting that one.You will get three radio button option like this
1:Overwrite the Existing Database.
 
By Checking that one and Press ok Button and your Database will be restored.
 
Regards,
 
AnilKumar.D
  Permalink  
Comments
Snehasish Nandy at 8-Apr-13 5:20am
   
@Anil: I know this but i need this thing through vb.net code..please see the tags..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 406
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 205
3 /\jmot 175
4 Shweta N Mishra 161
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100