Connecting to the datagrid at run time
Imports System.Data.OleDb
Imports System.Data
Dim ad As New DataSet
Dim con As New OleDbConnection
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=employee.mdb;Jet OLEDB:Database Password=12345"
Dim dset As New DataSet
Dim adap As New OleDbDataAdapter("select * from custdetails where jobno='" & TextBox1.Text & "'", con)
adap.Fill(dset, "cdet")
DataGridView1.AutoGenerateColumns = True
DataGridView1.DataSource = dset.Tables("cdet")
use the specific driver in the connection and specific database
-kaar3k@gmail.com
No comments:
Post a Comment