SETP
asked on
SQL Query
In VB.NET 2003, I have an OldDbCommand that returns certain records of an Access database table. What is the simplest way of showing this in a DataGrid?
The OleDbCommand can return a a Scalar value which is no good since I am returning a couple of columns.
It can return a DataReader, but I can't bind that to a DataGrid
It can return nothing - again no good.
Is there no way to get it to return a table or an array which can then be bound to the datagrid? Or will I have to use it's Fill method to popualte a DataSet and then bind the DataSet to the DataGrid?
Thanks
The OleDbCommand can return a a Scalar value which is no good since I am returning a couple of columns.
It can return a DataReader, but I can't bind that to a DataGrid
It can return nothing - again no good.
Is there no way to get it to return a table or an array which can then be bound to the datagrid? Or will I have to use it's Fill method to popualte a DataSet and then bind the DataSet to the DataGrid?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Absolutely correct. As DataReader object can't be serialized, you'll have problem if you want to Add Some Inbuilt functionality to DataGrid. But, it's one of the straight fwd and easy way of Populating Grid.
-tushar
-tushar
And, light-weight, too :) Less overhead, and faster, but not as much functionality.
Bob
Bob
Bob