Home All Groups Group Topic Archive Search About

Error Trying to add table to dataset

Author
4 Nov 2005 3:50 AM
Mark
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

Author
4 Nov 2005 8:03 AM
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
Author
4 Nov 2005 1:06 PM
Mark
Cor -

Howdoes one cross-post?

Thank you,
Mark

Show quote
"Cor Ligthert [MVP]" wrote:

> 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
>
>
>
Author
4 Nov 2005 1:17 PM
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
Author
4 Nov 2005 6:54 PM
Mark
I see it:
Under "Advanced Options"

I test it

Thnaks ,Mark

Show quote
"Mark" wrote:

> 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

AddThis Social Bookmark Button