Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Can anyone help with a update statment.
New Posts  All Forums:Forum Nav:

Can anyone help with a update statment.

post #1 of 2
Thread Starter 
I am having trouble getting this insert statment to work is there a way to just insert all ?

this is in vb.net 2010 using a database from sql server 2008 R2
Would love to get this working 100% as its the second to last piece to the program


Public Class Member

Private Sub MemberBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MemberBindingNavigatorSaveItem.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.TrusteeRentalsDataSet)

End Sub

Private Sub Member_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'TrusteeRentalsDataSet.Member' table. You can move, or remove it, as needed.
Me.MemberTableAdapter.Fill(Me.TrusteeRentalsDataSet.Member)

End Sub

Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
Me.MemberBindingSource.MovePrevious() 'moves to the previous record in the table
End Sub

Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
Me.MemberBindingSource.MoveNext() 'moves to the next record in the table
End Sub

Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click
Me.MemberBindingSource.MoveFirst() 'displays the first entry in the table
End Sub

Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click
Me.MemberBindingSource.MoveLast() 'displays the last entry in the table
End Sub

Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.TrusteeRentalsDataSet)

End Sub


Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
' Me.MemberTableAdapter.Insert(Member_NumberTextBox.Text, Member_Last_NameTextBox.Text, Member_First_NameTextBox.Text, Member_StreetTextBox.Text, Member_SuburbTextBox.Text, Member_CityTextBox.Text, Member_PhoneTextBox.Text, , Member_PasswordTextBox.Text)

End Sub

Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
Member_NumberTextBox.Text = ""
Member_Last_NameTextBox.Text = ""
Member_First_NameTextBox.Text = ""
Member_StreetTextBox.Text = ""
Member_SuburbTextBox.Text = ""
Member_CityTextBox.Text = ""
Member_PhoneTextBox.Text = ""
Member_Date_JoinedDateTimePicker.Value = Today
Member_PasswordTextBox.Text = ""

End Sub
End Class
Edited by ipv89 - 11/7/12 at 9:03pm
Mid range build
(12 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 3570k P8Z77-V ASUS ROG RX480 Corsair 8GB 2x 2GB + kingston hyperx 16gb 
Hard DriveOptical DriveCoolingOS
Samsung Evo SSD 500gb none corsair H80 windows 7 64 
MonitorPowerCaseMouse
Samsung s22b360 corsair tx 750 m NZXT phantom 410 (GM) logitech G400 
  hide details  
Reply
Mid range build
(12 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 3570k P8Z77-V ASUS ROG RX480 Corsair 8GB 2x 2GB + kingston hyperx 16gb 
Hard DriveOptical DriveCoolingOS
Samsung Evo SSD 500gb none corsair H80 windows 7 64 
MonitorPowerCaseMouse
Samsung s22b360 corsair tx 750 m NZXT phantom 410 (GM) logitech G400 
  hide details  
Reply
post #2 of 2
Ehhhhh I'm assuming you get an error of some sort?
Bandaids
(15 items)
 
  
MotherboardGraphicsHard DriveOptical Drive
Asrock Z77 Extreme 6 GTX 580 WD 10EALX ASUS DRW 
CoolingOSMonitorMonitor
Havik 140 Windows 7 Ultimate ASUS VH228T Toshiba 32RV600A 
MonitorKeyboardPowerCase
Compaq S2021a Microsoft Wired Keyboard 600 Aero Cool Strike X 1100w Asus Antec 
MouseMouse PadAudio
Logitech MX518 Mionix Ensis 320 Creative 2.1 
  hide details  
Reply
Bandaids
(15 items)
 
  
MotherboardGraphicsHard DriveOptical Drive
Asrock Z77 Extreme 6 GTX 580 WD 10EALX ASUS DRW 
CoolingOSMonitorMonitor
Havik 140 Windows 7 Ultimate ASUS VH228T Toshiba 32RV600A 
MonitorKeyboardPowerCase
Compaq S2021a Microsoft Wired Keyboard 600 Aero Cool Strike X 1100w Asus Antec 
MouseMouse PadAudio
Logitech MX518 Mionix Ensis 320 Creative 2.1 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Can anyone help with a update statment.