inserting data into table - Programmers Heaven

Howdy, Stranger!

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

Categories

inserting data into table

asharavinasharavin Posts: 1Member
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

  • chip050555chip050555 Posts: 32Member
    : 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.