Results 1 to 10 of 10

Thread: [RESOLVED] [2005] Updating datagrid to database

Threaded View

  1. #1

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Resolved [RESOLVED] [2005] Updating datagrid to database

    Hi All,

    I would like to have a feature on my program but i am unsure on how to do so.

    I would like to query a database and pull the Data from the database into a datatable, no worries there.

    Code:
        Sub LoadDataTable()
            'Using a Data adapter to load data into the DataTable..
            DA = New OleDb.OleDbDataAdapter("Select * from Employees WHERE Datey>= 26/07/07", CN)
            DT = New DataTable
            DA.Fill(DT)
    
            'initializing command builder, this will be used later..
            CMB = New OleDb.OleDbCommandBuilder(DA)
        End Sub
    But i would like the user to be able to edit the data in the datagrid and click a button to save and it will update the database.

    But if the row is a new row then it will insert the data into the database.


    Any ideas on how to do that?

    Many thanks

    ken


    However, if there is no
    Last edited by dinosaur_uk; Nov 15th, 2007 at 03:52 AM.
    If you find my thread helpful, please remember to rate me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width