473,320 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ASP.NET 2.0 ObjectDataSource question

Hello all,

The ObjectDataSource control uses reflection to create instances of business
components and call the appropriate methods to select, update,... data.

How can I use the ObjectDataSource control if I don't want to allow it to
instantiate the businesscomponents directly but use a ComponentFactory which
takes care of creating components. How can I use the ObjectDataSource
control with this factory. The code to create the component and obtain a
collection of business objects looks somewhat like this.

ICustomerComponent component = ComponentFactory().CreateCustomerCompoment();
ArrayList customers = customer.ReadCustomers();

Is this possible with the objectdatasource?

Kind Regards,
Kristof

Nov 19 '05 #1
1 986
My understanding is that this is a limitation, and the only work around is
to create a wrapper to your factory class which meats the ObjectDataSource's
criteria...

Check out
http://dotnetjunkies.com/WebLog/mlor.../25/48427.aspx for
more details

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Kristof Van Praet" <an********@yahoo.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
Hello all,

The ObjectDataSource control uses reflection to create instances of
business
components and call the appropriate methods to select, update,... data.

How can I use the ObjectDataSource control if I don't want to allow it to
instantiate the businesscomponents directly but use a ComponentFactory
which
takes care of creating components. How can I use the ObjectDataSource
control with this factory. The code to create the component and obtain a
collection of business objects looks somewhat like this.

ICustomerComponent component =
ComponentFactory().CreateCustomerCompoment();
ArrayList customers = customer.ReadCustomers();

Is this possible with the objectdatasource?

Kind Regards,
Kristof

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ole M | last post by:
I'm having some trouble using the ObjectDataSource in ASP.NET 2.0. I have a wrapper that contains the static methods for Select and Update. The Update-method takes the business object as...
3
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a...
2
by: planetthoughtful | last post by:
Hi All, I have an ASP.NET page that displays a GridView control based on an ObjectDataSource control. I'm wondering if it's possible to base the ObjectDataSource in question on a parameter...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
3
by: Doug Salomon | last post by:
Hi, Recently, my site has been generating errors which say: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
1
by: Barry L. Camp | last post by:
Hi all, Wondering if someone can help with a nagging problem I am having using a GridView and an ObjectDataSource. I have a simple situation where I am trying to delete a row from a table, but...
1
by: =?Utf-8?B?cm9zczYxMw==?= | last post by:
I really hope this is not a case of "this silly thing will never work".....lots of time invested in troubleshooting this already. I have created a standard ASP.NET web form (.aspx) with several...
0
by: Phillip Ian | last post by:
Tried this over in CSharp.General and didn't get anything, so I thought I'd try again here. If there's an AJAX specific group I could ask this in, please let me know...I did look. I'm trying to...
0
by: fig000 | last post by:
Hi, I'm using an objectdatasource. The insert procedure called by the objectdatasource is in a separate library file outside of the aspx and the codebehind that is using the objectdatasource in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.