|
-
May 15th, 2013, 12:22 PM
#1
Thread Starter
Junior Member
Update row in database
Hi all,
I've been trying to update data in my table.
This is my code
Code:
Private Sub Taalkeuze_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Fill Table
Me.GebruikersTableAdapter.Fill(Me.EasybyteDataSet.Gebruikers)
Me.Top = (Screen.PrimaryScreen.WorkingArea.Height - Me.Height) / 2
Me.Left = (Screen.PrimaryScreen.WorkingArea.Width - Me.Width) / 2
End Sub
Private Sub pcbNed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pcbNed.Click
EasybyteDataSet.Gebruikers(0).Item("Taal") = "NED"
gstrTaal = "NED"
Laadscherm.Show()
Laadscherm.cntTeller.Enabled = True
Me.Close()
End Sub
So when a user clicks the image it should update the table "Gebruikers" on index 0 and the item "Taal" to NED.
However it doens't seem to work.
Can anyone help me out?
Thanks
-
May 15th, 2013, 12:33 PM
#2
Re: Update row in database
Well...of course it doesn't work. You didn't tell it to do anything. You set the values, but that's it. You didn't tell it to update back to the database so of course it won't do anything! I recommend looking up a few database tutorials involving DataSets on Bing or Google before going any further with what you're doing.
Also, as a side note, there is a Property for the form that will start the form in the center of the screen. I forgot what the property name was, but I'm sure a quick search can find it.
-
May 15th, 2013, 12:35 PM
#3
Thread Starter
Junior Member
Re: Update row in database
Well I fixed it myself.
I forgot to add that it should update the tableadapter. Dumb me!
-
May 15th, 2013, 12:38 PM
#4
Re: Update row in database
 Originally Posted by DryGoldFish
Well I fixed it myself.
I forgot to add that it should update the tableadapter. Dumb me!
Foiled once again by hindsight!!
-
May 15th, 2013, 12:39 PM
#5
Thread Starter
Junior Member
Re: Update row in database
And also, thank you for the side note. I found the property.
It's called: StartPosition.
Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|