You are correct...the ods.select method *COULD* return a datatable, but it could also return any object that implements IEnumerable.
If you want to try it, do this :
object obj = objectdatasource.select();

i thought the ods.select method could return a datatable, from which you could get a dataset?
either way, I'm just trying to pass the object datasource dataset/view/table in a session to another page instead of reloading it. I guess I can just call the datatable I have in the business logic layer that calls the datatable and avoid the object datasource altogether...

You are correct...the ods.select method *COULD* return a datatable, but it could also return any object that implements IEnumerable.

If you want to try it, do this :

object obj = objectdatasource.select();
if (obj is DataTable){
// we have a data table
DataSet data = new DataSet();
DataTable table = (DataTable)obj;
data.Tables.Add(table);
// now you have a dataset with your datatable int it
// do your stuff
}else{
/// ooops
System.Diagnostics.Debug.WriteLine("Object retirned by objectdatasource was not a datatable is was a " + obj.GetType.ToString());
}

0

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Introduction
Although it is an old technology, serial ports are still being used by many hardware manufacturers.
If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports. I needed to…

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…