inserting data into table

I need to insert data from textboxes into data table.As per my code, the data is inserting one time.But that is temperory.If I run the program again, the inserted record is not available.It is not getting inserted in the actual data table.Please help me sort this problem out.

Comments

  • : I need to insert data from textboxes into data table.As per my code, the data is inserting one time.But that is temperory.If I run the program again, the inserted record is not available.It is not getting inserted in the actual data table.Please help me sort this problem out.
    :
    :
    You need to do the following:

    [code]
    dim CMD as New Data.OleDb.OleDbCommandBuilder(yourDataAdapter)
    CMD.DataAdaptor.Update(yourDataTable)
    yourDataTable.Rows.(currentrecordnumber).AcceptChanges()
    [/code]

    This should open your data adaptor and update your database.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion