saving data to a local database

  • 12 years ago

    hi guys

    i m trying to develop a simple app to store data in local database. when i test to post data to my local database it shows that everything goes well but i cant see the data in the data table when i try to retreive it..? can anyone help plz

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim newclientRow As catDataSet.clientsRow

    newclientRow = Me.CatDataSet.clients.NewclientsRow

    newclientRow.civilit‚ = TextBox1.Text

    newclientRow.nom = TextBox2.Text

    newclientRow.prenom = TextBox3.Text

    newclientRow.telephone = TextBox4.Text

    newclientRow.portable = TextBox5.Text

    'add new row to clients

    Me.CatDataSet.clients.Rows.Add(newclientRow)

    Me.CatDataSet.AcceptChanges()

    Me.ClientsBindingSource.EndEdit()

    ' Save the new row to the database

    Me.ClientsTableAdapter.Update(CatDataSet.clients)

    End Sub

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”