Re: Sharing datasources among forms - VS2005
- From: "Steve Marshall" <stevem@xxxxxxxxxxxxxx>
- Date: 25 Feb 2007 23:34:58 -0800
Yes, an approach like that has occurred to me, and I will pursue it.
It just doesn't seem to fit as naturally as I would like with the way
the IDE does things. Thanks for the reply.
On Feb 26, 9:38 am, "RobinS" <Rob...@xxxxxxxxxxxxxxx> wrote:
If you were really concerned about the performance, you could create a
public class with shared properties that point to datatables that you're
using to bind to comboboxes all over your app, and access that everywhere.
Robin S.
-------------------------"Steve Marshall" <ste...@xxxxxxxxxxxxxx> wrote in message
news:1172290469.442061.64020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have come across the situation several times where a number of forms
in an app use the same datasource, for example to populate a combo
drop-down. I'm sure we've all had this. Using the IDE results in
every form getting its own Dataset, BindingSource and TableAdapter,
plus code in the Open event to fill the table in the dataset. This
strikes me as incredibly inefficient - there is simply no need for
every form to go to the database to read this data in again. What I
want is a way to set up and populate a dataset once, then just refer
to it in all the forms that might need it. Is there a way to do this
that fits in with the IDE? If there is it isn't obvious to me.- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Sharing datasources among forms - VS2005
- From: Bart Mermuys
- Re: Sharing datasources among forms - VS2005
- References:
- Sharing datasources among forms - VS2005
- From: Steve Marshall
- Re: Sharing datasources among forms - VS2005
- From: RobinS
- Sharing datasources among forms - VS2005
- Prev by Date: RE: Determine support for ClearType
- Next by Date: RE: Customize Windows.Forms.MdiClient
- Previous by thread: Re: Sharing datasources among forms - VS2005
- Next by thread: Re: Sharing datasources among forms - VS2005
- Index(es):
Relevant Pages
|