|
>You would need some sort of gymnastics to code the IDataReader >generically, since I believe it is set up as inherit only. OK, now you've got me wondering... Off to VS.NET... OK, that actually works! Remember, we're not creating an IDataReader, the command object is creating an iDB2DataReader, we're just holding a reference to it in an IDataReader variable, which should be valid since an iDB2DataReader implements an IDataReader interface. Actually, you can also cast up to the correct data type. I tried: Console.WriteLine(((iDB2Connection) cn).JobName); Where cn is defined as an IDbConnection type, but points to an iDB2Connection object. It worked fine. So you could use provider-specific extensions as long as your code prevented you from using Sql extensions on an iSeries connection. Cool! -Walden ------------ 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 mailing list archive is Copyright 1997-2025 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.