Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datagridview table to update my database .Below is the initial code i have write but now i have no idea that how to code for save,delete,next,previous,last,new and refresh buttons.Please let me guide by any experience person.My Code is given below.Thanks



VB
Imports System.Data.OleDb
Public Class Form1
    

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\EmplTable.accdb;")
        Dim cmd As OleDbCommand = New OleDbCommand("SELECT *  FROM EmpData", con)

        con.Open()



        Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd)
        Dim myDataSet As DataSet = New DataSet()
        myDA.Fill(myDataSet, "EmpData")



        DataGridView1.DataSource = myDataSet.Tables("EmpData").DefaultView


        con.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        


    End Sub






End Class
Posted

1 solution

 
Share this answer
 
Comments
ionline4u 13-Jun-14 14:17pm    
but my project is in vb.net Please give me the code examples in VB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900