Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System.Data.RowNotInTableException
Message
 
À
06/11/2009 09:58:16
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01431150
Message ID:
01433636
Vues:
29
>Hi Eric,
>
>When you register the business object with the page, that is what the BindingSource builder is picking up. So your instance is registered and ultimately is used to obtain your data.
>
>Yes it is possible and easy but not quite as intuitive to get two sets of data from the business object. You can specifiy a different table name when you make the call so for instance you could specify a table name of "AddressLookup" and also use the default.
>
>Typically if I am doing this it because I need a set of data that I don't intend to update in anyway. For instance if I need a set of data to put in a combo box then I will just make a method that returns a dataset and bind that returned dataset to the combo box. Then the business object is free to use it again for entitylists and regular binding.
>Hope that helps.
>Tim
>
>>Tim, your deduction and advice are spot on.
>>
>>What I don't quite understand is the why aspx page controls are bound to the business object by specifying the class name, rather than a specific instance of the class. Would it even be possible to use two, say, address objects of the same class on a page?
>>
>>Eric
>>
Just to reinforce what you said, Tim, it gets a little tricky if you want to edit data in separate tables of the same business object. I have done that and had to turn off some of the entity centric features to avoid problems. If I had it to do over again, I would either set some sort of filter on the control or, since the controls with the separate tables are on separate tab pages, I would refresh the dataset upon changing tabs. In my case, the tables are not too large so that's not to big a hit. Definitely, the tables should have the same structure if you're going to have two separate tables. The other choice is to build a view for the second instance, which would result in a second business object. Of course, then you have to duplicate a lot of the methods for the view's business object.
Linda
Linda Harmes
HiBit Technologies, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform