I have been able to edit & update data in tables that have been created, but now I want to create a table mid code...I have everything working except when I check the database in access, the table that I created is not there...Please help!!!!
Here is the code for creating the new table:
Code:
Dim dtLine As New ViewerDBDataSet.TEMPLATE_QuoteLineItemDataTable
dtLine = dtLine.Copy
dtLine.TableName = "LineItemInfo_" & Me.txtQuoteNum.Text
Try
Dim item As Object
Dim index As Integer = 0
For Each item In arychkCustom
row = dtLine.NewRow
row(0) = (index + 1).ToString
row(1) = item.checked
row(2) = arytxtQty(index).Text
If item.checked = True Then
row(3) = arytxtGPN(index).Text
Else
row(3) = arycbxGPN(index).Text
End If
row(4) = arytxtDesc(index).Text
dtLine.Rows.Add(row)
index += 1
Next
Me.ViewerDBDataSet1.Tables.Add(dtLine)
Me.ViewerDBDataSet1.AcceptChanges()
I start off copying a table in order to get the correct schema...This table that I copy from is only used as a template and contains no data...