From: Mike S. <mi...@mi...> - 2004-04-29 09:04:59
|
>> I think the best for you will be to handle the NotSupported exception (other providers may throw it too) << This is the important point: what do other providers do? If none of them throw an exception, then the Firebird provider shouldn't. If some do and some don't, then it's a matter of opinion, but if the most common ones, e.g. SQL Server, don't then probably FB shouldn't either. I agree with Carlos that it *should* throw an exception, but no provider is an island so to speak, and we must think about compatibility with other providers. Can't you add an option in the connection string to switch off exceptions in this one case? That way, anyone wanting to switch providers just has to add one line to the connection string, and it'll work like some other providers. Cheers, Mike. Carlos Guzmán Álvarez wrote: > Hello: > >> In the database project that I've previously mention I had to write a >> persistance layer that wraps the Firebird.NET provider. The reason >> is that I can write to my persistance layer for both Firebird and >> possibly SQLServer and other DB's. A situation could arise whereby >> data could be obtained from disparate databases. >> >> The problem is that SQLServer provider supports ConnectionTimeout and >> the Firebird provider throws an exception. My request is that >> ConnectionTimeout rather than throw a runtime exeception to return 0 >> and use an Assert instead. >> >> Once again I modified the provider to return 0 causing no behavioral >> changes to the provider but now my layer can work polymorphically. >> > Do you mean FbCommand.CommandTimeout ?? I'm not going to change that, > at least for now, in my opinion that will give the false impression that > it's supported and that it works, and it fact if you are going to use > the CommandTimeout property probably you will be trying to call Cancel > that will raise an NotSupported exception as well. > > I think the best for you will be to handle the NotSupported exception > (other providers may throw it too) > > > Opinions ?? > > > > -- > Best regards > > Carlos Guzmán Álvarez > Vigo-Spain > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle > 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > > |