| | |
update problem
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2007
Posts: 6
Reputation:
Solved Threads: 0
hi,
im tinkering with vb.net 2008. Im trying to add two numbers then saving it to the table. The computation works but when I press the save button, i get this..
" invalidoperationexception was unhandled " at Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
can someone help me with this? if i learn how to fix this, i can make other programs. attached below is the code and thanks in advance for your help.
Public Class Form1
Private Sub NumbersBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.NumbersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
End Sub
Private Sub NumbersBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumbersBindingNavigatorSaveItem.Click
Me.Validate()
Me.NumbersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Computation_database_sampleDataSet.Numbers' table. You can move, or remove it, as needed.
Me.NumbersTableAdapter.Fill(Me.Computation_database_sampleDataSet.Numbers)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n1, n2, sum As Integer
n1 = Val(EnterFirstNumberTextBox.Text)
n2 = Val(EnterSecondNumberTextBox.Text)
sum = n1 + n2
TotalTextBox.Text = sum
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
EnterFirstNumberTextBox.Text = ""
EnterSecondNumberTextBox.Text = ""
TotalTextBox.Text = ""
EnterFirstNumberTextBox.Focus()
End Sub
End Class
im tinkering with vb.net 2008. Im trying to add two numbers then saving it to the table. The computation works but when I press the save button, i get this..
" invalidoperationexception was unhandled " at Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
can someone help me with this? if i learn how to fix this, i can make other programs. attached below is the code and thanks in advance for your help.
Public Class Form1
Private Sub NumbersBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.NumbersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
End Sub
Private Sub NumbersBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumbersBindingNavigatorSaveItem.Click
Me.Validate()
Me.NumbersBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Computation_database_sampleDataSet)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Computation_database_sampleDataSet.Numbers' table. You can move, or remove it, as needed.
Me.NumbersTableAdapter.Fill(Me.Computation_database_sampleDataSet.Numbers)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n1, n2, sum As Integer
n1 = Val(EnterFirstNumberTextBox.Text)
n2 = Val(EnterSecondNumberTextBox.Text)
sum = n1 + n2
TotalTextBox.Text = sum
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
EnterFirstNumberTextBox.Text = ""
EnterSecondNumberTextBox.Text = ""
TotalTextBox.Text = ""
EnterFirstNumberTextBox.Focus()
End Sub
End Class
![]() |
Similar Threads
- ComboBox UpDate Problem (VB.NET)
- Windows Update Problem (Windows NT / 2000 / XP)
- Program update problem (Windows Software)
- WMI Update Problem (Windows NT / 2000 / XP)
- Big Time Bug On New Windows Update (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: combobox selected value connected to a SQL statement
- Next Thread: making a forms
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account arithmetic array arrays basic bing button buttons c# center check checkbox code combobox convert crystalreport data database datagrid datagridview date dissertation dissertations dropdownlist excel fade file-dialog filter ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output panel passingparameters picturebox picturebox1 port position print printing problem project read remove save searchbox searchvb.net select serial server shutdown soap sorting survey table tcp temperature text textbox timer timespan toolbox trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio2008 web winforms wpf year





