Hi guys
Im busy learning ado.net. This is my code
I cant bind the datagridview to a table. How will i go on doing that?Code:Public Class Form1 Private CN As New OleDbConnection Private DataAdapter As OleDbDataAdapter Private CommandBuilder As OleDbCommandBuilder Private KeyGen As New DataTable Private RowPosition As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\KeyGenTruckSpecs.mdb" CN.Open() DataAdapter = New OleDbDataAdapter("SELECT * FROM KeyGen", CN) CommandBuilder = New OleDbCommandBuilder(DataAdapter) DataAdapter.Fill(KeyGen) End Sub End Class
using vb.net
Regard
Gerald




Reply With Quote