How to insert record using datagridview in vb2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sonydev
    New Member
    • Jun 2007
    • 1

    #1

    How to insert record using datagridview in vb2005

    i want know how can insert record into access database by inserting it to datagridview, plz reply me with simle code.
    thank you
  • sahachinmoy
    New Member
    • Jun 2007
    • 2

    #2
    Originally posted by sonydev
    i want know how can insert record into access database by inserting it to datagridview, plz reply me with simle code.
    thank you
    Since u r using vb2005 u have to use data control to connect to ur database.
    Hope u can do that.(If u dont know let me kno)
    Then bring the datagrid on ur form. Then select the datagrid and look to the properties and do the following

    1> Select the data source property of ur datagrid and u will find the name of ur data control there. Select it.
    2>Enable these following Properties.
    a>AllowAddNew---True
    b>AllowDelete-----True
    c>AllowUpdate-----True

    This will do now run the program and u will see that u can insert data in your database using the datagrid view.

    Chinmoy

    Comment

    Working...