Re: OracleClient.OracleDataReader dataGrid
From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 07/28/04
- Next message: Val Mazur: "Re: ADO, SQLServer2000 and errors"
- Previous message: JM: "OracleClient.OracleDataReader dataGrid"
- In reply to: JM: "OracleClient.OracleDataReader dataGrid"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 21:21:13 -0400
On WebForms you can, you just set the datasource to command.ExecuteReader.
On the desktop there isn't , at least not yet. You'll be able to in ADO.NET
2.0 - not doing you any good now but a very cool feature. The datatable
will have a .Load method which takes a datareader as a parameter and
populates the Datatable from it - I wrote a little about it
http://msmvps.com/williamryan/archive/2004/07/14/10090.aspx here and it's
very cool.
For the time being, you're going to hvae to either bind to a datatable
(which isn't a bad thing even on the web b/c you may need some of the iList
features) or loop through your reader and build a datatable from it - since
adapters use DataReaders behind the scenes w/ Fill, you're not gaining much
and when you consider the maintenance burden - it's probably a raw deal.
HTH,
Bill
-- W.G. Ryan MVP Windows - Embedded Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Let Microsoft know! https://www.windowsembeddedeval.com/community/newsgroups "JM" <JM @discussions.microsoft.com> wrote in message news:CA50F21D-C386-4243-832C-0D2631EA0581@microsoft.com... > Is there a way to load a DataGrid using an OracleClient.OracleDataReader? I've seen code where a SqlDataReader is used, but I get an error when trying to use an OracleDataReader. > >
- Next message: Val Mazur: "Re: ADO, SQLServer2000 and errors"
- Previous message: JM: "OracleClient.OracleDataReader dataGrid"
- In reply to: JM: "OracleClient.OracleDataReader dataGrid"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|