Dataset how to Update in RunTime 
Author Message
 Dataset how to Update in RunTime

Hi;

I have a problem after update the database table, I don't
know how to update Dataset in runtime.

Sorry, my english is little.

My fragment code:

Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load

    PubCon.ConnectionString = "Provider=MySqlProv.3.0;Data
Source=Test;Integrated Security=;Password=PASSWORD;User
ID=USER;Location=IP;Extended Properties="

    PubCom = New OleDb.OleDbCommand("Select * from
Clientes008", PubCon)

    PubCon.Open()

    PubAdp = New OleDb.OleDbDataAdapter()

    PubAdp.SelectCommand = PubCom

    PubSet = New DataSet()

    PubAdp.Fill(PubSet, "Clientes008")

    Registro = 0

    txtCod.Text = PubSet.Tables("Clientes008").Rows
(Registro).Item(0).ToString

    txtCli.Text = PubSet.Tables("Clientes008").Rows
(Registro).Item(1).ToString

End Sub

Private Sub Button5_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button5.Click

    Dim Sql As String = "Update Clientes008 set
DESCLI008='" & UCase(txtCli.Text) & "' " & _

                                        "Where CODCLI008
= " & CType(txtCod.Text, Integer)

    PubCom.CommandText = Sql

    PubCom.ExecuteNonQuery()

End Sub



Sun, 05 Jun 2005 20:24:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. dataset problems - cant update sql after editing dataset

2. Dataset changes updates grid , How to update SQL table

3. Recordset.Update doesn't update on runtime only when debugging the code

4. Viewing a dataset at runtime

5. Linking a dataadapter to a dataset in runtime

6. Binding a DataSet to a ComboBox at runtime

7. Setup Dataset in Runtime?

8. Binding an ADO.NET DataSet at runtime?

9. updating a dataset to the SQL Database

10. vb.net datagrid updating underlying dataset

11. Updating a dataset to a different database

12. Problem with Updating Dataset contents back to db when using data binding

 

 
Powered by phpBB® Forum Software