By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

How to Use Merged Dataset rows

P: n/a
Hi

Im using .net 2.0 and i am merging a table from one strongly typed dataset
into another. If i then do a select on the rows within the table I merged
and subsequently try to access the columns of any of those rows using the
strongly typed name, i get an exception saying column "Column1' does not
belong to table 'Table1'. i.e

Dim ds As New dsTester
ds.Tester.AddTesterRow("r1c1", "r1c2", "r1c3")
ds.Tester.AddTesterRow("r2c1", "r2c2", "r2c3")

Dim ds2 As New DataSet1
ds2.TableIt.AddTable1Row("DDD", "CCC")
ds2.TableIt.AddTable1Row("DDD", "CCC")

ds.Merge(ds2.Table1)

Dim rows As DataSet1.Table1Row()
rows = CType(ds.Tables("Table1").Select("Column1='DDD'"),
DataSet1.Table1Row())
Debug.Write(rows.Length) ' prints 2
debug.writeline(rows(0)("Column1")) ' prints DDD
debug.writeline(rows(0).Column1) ' THROWS EXCEPTION

What am i doing wrong?

Steven
Mar 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.