How we can show data from acess database in datagrid
please help me about the code
>How we can show data from acess database in datagrid
First of all you need to use System.Data.OleDB provider classes to have database connection and select statement result.
Dim CnStr as String="Connnection_string_here"
Dim Sql as String="Select * from tableName"
Dim Adp as new OleDBDataAdapter(sql,CnStr)
Dim Dt as new DataTable
Adp.Fill(Dt)
DataGridView1.DataSource=Dt
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.