Datasets can contain related tables and in your current scenario, it
appears that the Address table will be related to the Persons table
via the PersonID. So, you should be able to retrieve the related
Address field based on the Foreign key.

Secondly, the DatasetDesigner file is autogenerated and will be
replaced whenever you refresh the dataset design.

On Dec 23, 2:38 pm, PawBoc <[email protected]> wrote:
> Hello.
>
> I am writing small application with aspx (framework 4.0). I have
> created typed datasets for holding data from db. Lets say I have table
> Person and table Address. Person can have 0..(some) addresses.
>
> I have form to search persons, but I wish to show also their
> addresses.
>
> The question is - is there a possibility to simple fill DataSet's
> Address table base on PersonID from Person table?
> Currently I am builiding query string, but I find this strange
> solution?
>
> The second question is - I have used DataSet designer. While building
> my queury string I am construviting SQL with WHERE ... IN ... As far
> as I know there is no possibility to build query in query-builder
> which takes an array as a param and merg it into list. But I find file
> PersonDataSetDesigner.cs which has all methods generated.
> Is it possible to add my own fill method here which will take an array
> and transfers it into string and than puts it into param?
>
> regards

Reply via email to