Re: Created Dataset with two tables - How do I populate at runtime by Cowboy
Cowboy
Fri Jun 09 08:15:57 CDT 2006
Unfortunately, the MS literature is WAY too focused on filling a single
table. Glad it worked for you.
--
Gregory A. Beamer
*************************************************
Think Outside the Box!
*************************************************
"dchman" <dchman@discussions.microsoft.com> wrote in message
news:D8F8ABB8-71B9-43A0-9847-E057AB3D4BA0@microsoft.com...
> thanks for the tip. I used Item 3 as you suggested, which worked like a
> charm. I wasn't aware that I could do populate two tables in one dataset
> so
> easily.
>
> --
> dchman
>
>
> "Cowboy (Gregory A. Beamer)" wrote:
>
>> There are a couple of ways.
>>
>> 1. Pass the DataSet to two different DataAdapters and let them populate
>> each
>> table.
>> 2. Get the data independently and "migrate" to the DataSet
>> 3. Call a single sproc to fill both tables.
>>
>> Of the options, I like three the best (one trip) in most cases. Fill the
>> parent before the child.
>>
>> --
>> Gregory A. Beamer
>>
>> *************************************************
>> Think Outside the Box!
>> *************************************************
>> "dchman" <dchman@discussions.microsoft.com> wrote in message
>> news:24AF9354-0753-41C6-BB6F-C7390D85B43E@microsoft.com...
>> > In VS 2005, I created a dataset with the dataset designer that has two
>> > tables
>> > that have a parent-child relationship (which I also added in the
>> > designer).
>> > Each table gets data from a stored procedure. I want to populate the
>> > dataset
>> > at runtime, passing in a parameter from another control on the form,
>> > then
>> > pass the dataset to a crystal report. And that is what I haven't
>> > figured
>> > out
>> > - how to populate the dataset at run time. Can someone point me in the
>> > right
>> > direction?
>> >
>> > thanks
>> > --
>> > dchman
>>
>>
>>