Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.