× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>...and I can switch between them by changing the using clauses.
>...nearly no application code changes... 

That's still a code change. I'd like to do it with a change in
web.config. 

I've seen the block before, and it has some nice features, but still
requires some code changes for a change in provider -- as you mention,
you need a copy of the data block for each provider (OLE/DB, SQL,
iSeries, Oracle, etc.) and you need to change the code in the consuming
function too. 

Take the ExecuteReader method, MS's returns an SqlDataReader object, I
imagine yours returns an iDB2DataReader object, how do you deal with
that in the consuming function? Granted, you could use the generic
DataSet object, but there are performance issues with that[1]. 

I'm looking at the fact that all these DataReaders, for example,
implement the IDataReader interface, so why not code to that interface.
Granted, you'll loose any provider-specific enhancements (for example,
packet size for SQLServer or JobName for the iSeries) but if you're
using them you've tied yourself to a provider anyway.

As far as I can tell (looking _very_ quickly) the only thing that would
need to be provider aware is the actual creation of the connection
object. I'd like to see a generic connection class factory that used
something like LoadAssembly and reflection to load and return a
provider-specific connection object w/o knowing anything about the
provider at compile time. 

Actually, I'd like to see a more robust implementation of connection
pooling, and I could hide the implementation details in the pool.

-Walden

[1] I don't know if "issues" is a fair term. The DataSet is fast, it's
just that a DataReader is fastER.

------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.