In an application, i am using embedded version. I am opening db, performing
some operations, closing the connection, backing up and restoring it. But
restoring fails because db is still open, though have disposed connection.
Any idea, how can i achieve this?

Thanks,
Manish


On 4/2/07, Jiri Cincura <[EMAIL PROTECTED]> wrote:

manish shukla wrote:
> oh, i am sorry.
> thanks for the info.
> can you tell me how to do backup and restore by using data provider? i
> am using embedded version.

public void BackupTest()
               {
                       FbBackup backupSvc = new FbBackup();

                       backupSvc.ConnectionString =
this.BuildServicesConnectionString ();
                       backupSvc.BackupFiles.Add(new
FbBackupFile(BackupRestoreFile, 2048));
                       backupSvc.Verbose = true;

                       backupSvc.Options = FbBackupFlags.IgnoreLimbo ;

                       backupSvc.ServiceOutput += new
ServiceOutputEventHandler(ServiceOutput);

                       backupSvc.Execute();
               }

               public void RestoreTest()
               {
                       FbRestore restoreSvc = new FbRestore();

                       restoreSvc.ConnectionString =
this.BuildServicesConnectionString();
                       restoreSvc.BackupFiles.Add (new
FbBackupFile(BackupRestoreFile, 2048));
                       restoreSvc.Verbose = true;
                       restoreSvc.PageSize = 4096;
                       restoreSvc.Options = FbRestoreFlags.Create |
FbRestoreFlags.Replace;

                       restoreSvc.ServiceOutput += new
ServiceOutputEventHandler(ServiceOutput);

                       restoreSvc.Execute();

--
Jiri {x2} Cincura
http://blog.vyvojar.cz/jirka/ | 
http://www.ID3renamer.com<http://www.id3renamer.com/>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to