Re: Fill DataSet tables from one SPROC by Raterus
Raterus
Tue May 03 12:45:14 CDT 2005
Thanks! I was able to get it working properly. Like you said, the =
tables coming from the sproc were named "Table, Table1, Table2", so to =
get the mappings set up I had to do this before I called .Fill().
myDataAdapter.TableMappings.Add(new DataTableMapping("Table", =
"someTableInDataSet"))
myDataAdapter.TableMappings.Add(new DataTableMapping("Table1", =
"anotherTableInDataSet"))
"ural" <ural@discussions.microsoft.com> wrote in message =
news:2488F598-FD25-4C8B-93AC-1243C513A485@microsoft.com...
> when fill a dataset using adapter, you will get table names like =
Table,=20
> Table1 etc.
> For example, if you want the first table name should be UserDetail =
second is=20
> countrydetails
> you can do it using DataTableMapping collection.
> for mapping the column names, you need to use DataColumnMapping =
collection.
>=20
> Right now i dont have small example on this. you can explore more on =
this=20
> direction using this pointer.
>=20
> "Raterus" wrote:
>=20
>> Hello,
>>=20
>> I have a Typed DataSet added to my VS.net Project. This DataSet has =
two tables I'm interested in filling. I'd like to know if it is =
possible to fill both tables from one SqlDataAdapter.Fill() call. My =
stored procedure returns two resultsets. How would map the resultsets =
returned from the sproc to the correct tables in the DataSet?
>>=20
>> Thanks,
>> --Michael
>>