Here is code SqlConnection connection = new SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Working Directory\Win Application\Nakoda\Development\Bin\Database\cERP.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"); ServerConnection srvConn = new ServerConnection(connection); // Create a new SQL Server object using the connection we created srvSql = new Server(srvConn); // If the user has chosen the file from which he wants the database to be restored if (openBackupDialog.ShowDialog() == DialogResult.OK) { //Declare a BackupDeviceItem by supplying the backup device file name in the constructor, and the type of device is a file. BackupDeviceItem bdi = default(BackupDeviceItem); bdi = new BackupDeviceItem(openBackupDialog.FileName, DeviceType.File); //Create another file device for the differential backup and add the Backup object. BackupDeviceItem bdid = default(BackupDeviceItem); bdid = new BackupDeviceItem(openBackupDialog.FileName, DeviceType.File); // Set the database that we want to perform the restore on string db = cmbDatabase.SelectedItem.ToString(); //rstDatabase.Database = db; //Define a Restore object variable. Restore rs = default(Restore); rs = new Restore(); //Set the NoRecovery property to true, so the transactions are not recovered. rs.NoRecovery = true; //Add the device that contains the full database backup to the Restore object. rs.Devices.Add(bdi); //Specify the database name. rs.Database = db; //Restore the full database backup with no recovery. rs.SqlRestore(srvSql);
I Got Exception Microsoft.SqlServer.Management.Smo.FailedOperationException occurred HelpLink=http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ\_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476 Message=Restore failed for Server '\\.\pipe\1FF7F0B1-18D8-42\tsql\query'. Source=Microsoft.SqlServer.SmoE
kirankkk2009
Posts
-
Problem in restoring SQL Server MDF File database -
Sheet Metal Cutting Algorithmthx for suggestion. but any one has done same kind of sheet cutting logic it will more helpful for me.
-
Sheet Metal Cutting Algorithmthx for your suggestion. if any one has done same kind logic for cutting it will be more helpful for me.
-
Sheet Metal Cutting AlgorithmI have raw metal sheets of various rectangular sizes (x1*y1, x2*y2, ... xn*yn).I want select best fit sheet which fullfill my requirement for getting new sheets of X*Y it also has some tolerence. e.g I have metals sheets like 200*100,300*200,250*500,50*100,100*100 and I Require 3 pieces of 100*100 with 3mm tolerence.so how do I find the best fit soluion and how do I implement this logic. Thanks in advance.
-
Sheet Metal Cutting AlgorithmI have raw metal sheets of various rectangular sizes (x1*y1, x2*y2, ... xn*yn).I want select best fit sheet which fullfill my requirement for getting new sheets of X*Y it also has some tolerence. e.g I have metals sheets like 200*100,300*200,250*500,50*100,100*100 and I Require 3 pieces of 100*100 with 3mm tolerence.so how do I find the best fit soluion and how do I implement this logic. Thanks in advance.
-
Multi level marketing mlm asp.net Tree structure logicI got one code link http://www.jobscat.com/pre-interview-test-f13-write-the-code-for-binary-tree-mlm-t3554.html[^] but it has no any idea about how to show it
-
Multi level marketing mlm asp.net Tree structure logic -
Multi level marketing mlm asp.net Tree structure logicHi All, plz tell me Multi level marketing mlm asp.net Tree structure logic. :zzz: :confused::mad:
-
Multi-Level-Marketing (MLM) Asp.net [modified]I need help developing MLM in asp.net:confused::confused: how to show Binary tree & save data in database
modified on Wednesday, October 14, 2009 1:37 AM