Thank you for your quick answer.

I'm not sure to understand what you mean for the event. If you're talking
about the FbBackup.ServiceOutput event, I made tests with and without
registering to it, but in both cases the behavior does not change. It seems
that only setting the FbBackup.Verbose property to true or false changes the
behavior with respect to synchronicity.

If I set FbBackup.Verbose to true, the method FbBackup.Execute() returns
immediately, while the database is still being backed up.

If I set FbBackup.Verbose to false, the method FbBackup.Execute() returns
only when the backup is done, both with and without registering to the
FbBackup.ServiceOutput event.

So am I right to assume that when the verbose mode is false, the method is
asynchronous, and that when the verbose mode is true, the method is
synchronous and that the firebird .net provider waits for the server to
finish the backup before returning the control to the caller? And if I'm
wrong and in both cases the method is asynchronous (and the fact that in my
case with the verbose mode on it returns only when the job is done is some
kind of coincidence), is there a way to know when the backup is done?

Marc


-----Message d'origine-----
De : Jiri Cincura [mailto:disk...@cincura.net] 
Envoyé : jeudi 3 février 2011 11:37
À : For users and developers of the Firebird .NET providers
Objet : Re: [Firebird-net-provider] FbBackup and FbRestore bug?

On Thu, Feb 3, 2011 at 11:22, Marc Bettex <bet...@epsitec.ch> wrote:
> Hi,
>
> I have some strange behavior with the FbBackup and the FbRestore objects.
> >From what I have read in the mailing list archive, I think that their
> Execute() method should by synchronous, i.e. that the backup or the
restore
> of the database is done when the method returns.
>
> When I backup/restore a database with these objects and I set their
verbose
> mode to false, then the method behaves asynchronously and returns
> immediately, while the database is stilled being backed up or restored.
Then
> when I try to connect to the database, I get an exception because the
> database has been shut down. However, when I set their verbose mode to
true,
> their behavior seems to become synchronous and the method returns only
when
> the backup/restore is done. I'm not sure that the method is really
> synchronous in that case, or if it is luck or due to some side effect in
the
> tracing. These two behaviors are reproduced each time I try to do this.
>
> There is this bug report (http://tracker.firebirdsql.org/browse/DNET-114 )
> which might be related, but I'm not sure. Also, I haven't found any
> description of how these methods are supposed to behave, so I don't really
> know if that's a bug or their intended behavior.
>
> So, does anybody have an idea or an explanation about this?

The method behaves according to Services API provided by server. Hence
when you start the backup/restore, it runs on server and the client
only gets the string output (if requested).

Maybe you are confused, because the event is fired while processing
the coming data and your event handler effectively process it.

-- 
Jiri {x2} Cincura (x2develop.com founder)
http://blog.cincura.net/ | http://www.ID3renamer.com

----------------------------------------------------------------------------
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to