Having problem with typed dataset with multiple tables.

K

Ken Varn

I have a typed DataSet that contains 4 tables. I have mapped a data adapter
to all of the tables in the DataSet. The select command for the data
adapter has a multiple join on all four tables in the typed DataSet. When I
try to do the Fill command, I get an InvalidOperationExcpetion. The message
says that there is an invalid source mapping for one of my columns.

If I change my select statement to only return rows from one table in the
result set, it works fine. Not sure why the other table mappings are not
working.

My select string looks something like this:

select top 500 * from tblEventImages
left outer join tblEventOccurrences on tblEventImages.EventID =
tblEventOccurrences.EventID
left outer join tblImageAnnotations on tblEventImages.TimeDate =
tblImageAnnotations.TimeDate
left outer join tblEventTransactions on tblEventImages.EventID =
tblEventTransactions.EventID

Could someone please indicate how to do the data adapter table mapping for
this? Maybe I am doing something wrong here, but I cannot figure out what
it is.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
 
S

Sylvain Lafontaine

You must populate table by table. Contrary to Recordsets, the DataReader
(used by the data adapter to populate the dataset) doesn't keep a record of
individuals tables when the select statement returns fields from more than
one table: it only sees as a big single table.

S. L.
 
I

intrader

Why do you need to know the various tables?. It looks like one table, it
is one table.
However, using XML you are able to create multiple tables in the results
set. Each fill go to a different table in the dataset.

On Wed, 16 Feb 2005
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top