I am using Visual Basic Express 2010, and I have made a connection to the database I created when I Use nothing on the first hand, wrong I can see the data I use to put in my database program and the data is also in my database itself, but when I close the footage basic and after a few days all my databases Look my last date Has disappeared, so my data to make it simple to save permanently and now do I know this because I use datasets that have an offline database connection. And now my question is, can I change my code so that when I click on 'Save' then is actually saved in my database and does not disappear in a few days?
public class KlantToevoegen Private Sub KlantBindingNavigatorSaveItem_Click (ByVal as the System.Object, ByVal e System.EventArgs) as handle KlantBindingNavigatorSaveItem.Click so TbGemeente: My code (a few things bout sorry In Dutch) .text = "" or TbPostcode.Text = "" or TbAdres.Text = "" or TbVoornaam.Text = "" or TbNaam.Text = "" then MsgBox ("Update failed!") Otherwise Me Validate () my Manage KlantBindingSource.EndEdit () Me.TableAdapterManager.UpdateAll (Me.PowerShotKassaBonDataSet) MsgBox ( "Update successful happened") ending End Sub Private Sub KlantToevoegen_Load (ByVal as from System.Object, as ByVal e System.EventArgs) Does MyBase.Load me KlantTableAdapter.Fill (Me.PowerShotKassaBonDataSet.Klant) end sub-private sub-TbGemeente_Text (TBGemeente.TextChanged) as TBGemeente.Text = "" handles as .View EventArgs in the form of Byval Sender System, as the system. Then "Me.ErrInvullen.SetError" (Me. TBGMETE, "Jiff de Gimentant in.") Or else Me.ErrInvullen.SetError (Me.TbGemeente, "") End End Sub Sub-Private Sub TbPostcode_TextChanged (as System.Object, as E. System.EventArgs) TbPostcode.TextChanged does not have IsNumeric (Me.TbPostcode.Text) then Me.ErrInvullen.SetError (Me.TbPostcode, "Postcode in Geef een (right).") TbPostcode.Text = "" Me.ErrInvullen.SetError (Me.TbPostcode, "") End If TbPostcode.Text.ToString. Langs & gt; 4 And TbPostcode.Text = "" Me.ErrInvullen.SetError (Me.TbPostcode, "Geef een correct postcode.") Geef een correct postcode in MsgBox ( ".") End If End Sub Private Sub TbAdres_TextChanged (this System.Object TbAdres.Text = "so, TbAdres.TextChanged handles e System.EventArgs)" then Me.ErrInvullen.SetError (Me.TbAdres, "Geef het know.") Otherwise Me.ErrInvullen.SetError (Me .TbAdres, "") end end sub manages private sub TbVoornaam_TextChanged (as in this System.Object, e System.EventArgs) TbVoornaam.TextChanged so TbVoornaam.Text = "" or IsNumeric (Me.TbVoornaam. Text) Then Me.ErrInvullen.SetError (me.TbVoornaam, "Geef een Voornaam.") Or else Me.ErrInvullen.SetError (Me .TbVoornaam, "") End End Sub Private Sub TbNaam_TextChanged (such as System.Object, manages e System.EventArgs) TbNaam.TextChanged so TbNaam .text = "" or IsNumeric (Me.TbNaam. Text then Me.ErrInvullen.SetError (Me.TbNaam, "Geef een name.") Or else Me.ErrInvullen.SetError (Me.TbNaam, "") end then End Sub Ending Class
< / Div>
No comments:
Post a Comment