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
"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