I need to create a temp table in VB2005 and then add data so I can create forms and labels after I have gotten all the required infor from other SAP tables. I have enclosed my code and could really use some help. I thought everything was working but when I try and view the data in the temp table there is nothing or it just isn't showing up.
Try
Me.WBDataTableTableAdapter.WBFill(Me.WBDataSet.WBDataTable, New System.Nullable(Of Decimal)(CType(Main.txtDate.Text, String)))
intDBCount = Me.WBDataSet.WBDataTable.Count
Do Until intDBCount = 0
strFSC = Me.WBDataSet.WBDataTable(intRowCount).FSC
strMlevel = Me.WBDataSet.WBDataTable(intRowCount).MAINTLVL
strEIC = Me.WBDataSet.WBDataTable(intRowCount).EIC
Me.RCNTEDataTableAdapter.FillRCNTEData(Me.WBDataSet.RCNTEData, Me.WBDataSet.WBDataTable(intRowCount).RPR_ADDR)
Me.EicDataTableAdapter.FillEIC(Me.WBDataSet.EICData, Me.WBDataSet.WBDataTable(intRowCount).EIC)
intLimit = Me.WBDataSet.RCNTEData(0).MEL_DOL_LMT_10
bMulti = True
If strMlevel = "F" Or strMlevel = "H" Then
Select Case strFSC
Case "1560"
Case "1610"
Case Else
bMulti = False
End Select
End If
If bMulti = False Then
iMultiplier = 1
Else
Select Case intLimit
Case Is <= 10000
iMultiplier = 0.74
Case Is <= 30000
iMultiplier = 0.77
Case Is <= 50000
iMultiplier = 0.78
Case Is <= 100000
iMultiplier = 0.79
Case Is > 100000
iMultiplier = 0.8
End Select
End If
If strMlevel = "D" Then
iMultiplier = 1
ElseIf strMlevel = "F" Or strMlevel = "H" Then
Else
iMultiplier = 0.65
End If
strRecordCode = Me.WBDataSet.EICData(0).RECORD_GP_CD_12
strEndItem = Me.WBDataSet.EICData(0).ENDITEM
intDBCount = intDBCount - 1
intRowCount = intRowCount + 1
Update_Temp_Table()
Loop
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
I would really appreciate any help!!!

Creating, Adding and Viewing Data in a table
Jens Suessmeyer
Hi-
Glad to hear you solved in. Just in case, the way I would do it is simply:
Me.WBDataTableTableAdapter.Update(Me.WBDataSet.WBDataTable.GetChanges)
Make sure you do not call Me.WBDataSet.WBDataTable.AcceptChanges. This will actually erase the datasets internal diffgram of the data changes needed by the TableAdapter's Update method. The TableAdapter in turn will Accept the changes for you once the update is done successfully.
Best,
Paul
chevoldavis
Cross reference
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=846926&SiteID=1&mode=1
mzt
I could really use some help! I have figured out how to create my temp table and I can load it with my information but I can not figure out how to update my table. I do not have any code because I do not understand any of the help. So, I would appreciate a step by step procedure in updating a dataset.
This is where I update my dataset. These are just the fields that are changing.
Step One:
TempDataSet.WBTempTable.RECORDCODEColumn.Expression = strRecordCode
TempDataSet.WBTempTable.ENDITEMColumn.Expression = strEndItem
Step Two:
'update table
Try
TempDataSet.WBTempTable.GetChanges()
TempDataSet.WBTempTable.AcceptChanges()
Catch eSave As System.Exception
MessageBox.Show(eSave.Message)
End Try
Please, Please Please, HELP!!!!!
kettch