ObjectDatasource - Does it support multiple data tables?

F

Felix_WafyTech

Hi,

I'm working with the ObjectDatasource and the application is getting more
and more chatty. Is there a way I could make the ObjectDatasource support
multiple DataTables that could be retrieved as one Dataset? I'm wondering
how others out there work with ObjectDatasource?

The only option I now see to get this fixed is to manually make the call to
the Web services, retrieve the Dataset and assign the datatable to the
controls (Or can I just assign it to the ObjectDataSource?)

Thanks,
Felix.J
 
S

Steven Cheng[MSFT]

Welcome to ASPNET newsgroup Felix,

As for the multiple data tables query with objectdatasource, do you mean
that the query used by your datasource will need to cover mutiple tables or
you just need to query multiple tables to local side and cache them so that
objectdatasource can use later? IMO, since objectdatasource control is
used to bind our databound server control with some custom data access
component classes, we can consider the customization on the data access
component class. In our custom data access component class, we can
encapsulate the internal mutiple data query or caching in the class and
call them through your exposed methods (select, update ....). e.g:

we can have class named OrderDAO which is used to manipulate Order datas
which will refer to other table like customer, order details..... Then,
we can define some private methods on the OrderDAO class such as an Init
method which is called by the class once(in constructor or in Select
method) when necessary, it will access database and read multiple data
tables and cache the results (datatables) in applciation cache for
sequential use....

So how you customize the Data Access component class is up to you, this is
the most flexible function objectdatasource has provided us.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top