From: <meg...@ya...> - 2004-02-03 09:57:21
|
Hello All, I'm having some strange problem while using the Service classes of the Firebird provider. I'm using FbBackup and FbRestore. Here is the code : ------------------------------------------------------------------- try { FbBackup objFbBackup = new FbBackup(); objFbBackup.UserName = user; objFbBackup.UserPassword = password; objFbBackup.Database = dbFile; objFbBackup.BackupFiles.Add(new FbBackupFile(dbBackFile, 4096)); objFbBackup.Options = FbBackupFlags.IgnoreLimbo; objFbBackup.Start(); objFbBackup.Close(); FbRestore objFbRestore = new FbRestore(); objFbRestore.UserName = user; objFbRestore.UserPassword = password; objFbRestore.Database = dbFile; objFbRestore.BackupFiles.Add(new FbBackupFile(dbBackFile, 4096)); objFbRestore.PageSize = 4096; objFbRestore.Options = FbRestoreFlags.Replace; objFbRestore.Start(); objFbRestore.Close(); } catch(Exception ex) { //LogException(); } finally { /*Delete back up file.*/ System.IO.File.Delete(dbBackFile); } ------------------------------------------------------------------- This piece of code is working fine when I execute my project in Debug mode. But when I make an executable, this code gives error. The error message is (formatted) Message : No message for code 190 found. No message for code 133 found. No message for code 233 found. Source : FirebirdSql.Data.Firebird TargetSite : Void startTask() I couldn't make it, why this error would come. Is FbBackup.Start() asynchronous and there should be an explicit Thread.Sleep() after backup? There shouldn't be any connection active, before backup. Isn't? For this I tried to use FbConfiguration object for a forced shutdown. But that was also of no help. Can u give me any idea, why this could be happen? Thanx, Mahesh. --------------------------------- Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now |