Error Trying to add table to dataset

G

Guest

I'm trying to add a table to a dataset but get the error:

"A DataTable named 'BordDates0040' already belongs to this DataSet."

Code:
Dim dtBordDates As DataTable
dtBordDates = LoadTable(strDBPath & strDBName, strTableName,
strSQL)

Dim ds2 As DataSet = New DataSet()
Dim dt2 As DataTable = New DataTable()
dt2 = dtBordDates.Copy()
ds2.Tables.Add(dt2) '**** Error happens here ****

Any Suggestions?

Thanks, Mark
 
C

Cor Ligthert [MVP]

Mark,

Will you be so kind not to multipost. Crossposting sending one message is no
problem at all, and in a lot of cases even appreciated if you do that.

I have given an answer on your question in another newsgroup.

Thanks in advance.

Cor
 
C

Cor Ligthert [MVP]

Mark,

It depends on your newsreader, mostly I add that. You can set in the address
more newsgroups. In the culture setting from me I have to use ; between
them, however it is just the same as sending one mail to more persons.

Cor
 

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