GAD Practical 24

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Practical 24

Name: - Rohit Ashok Parsode sub:- GAD

Class :- CO4I Roll no:- 49

GUI application development using VB.NET

Q. 24 Design the windows application that will dispaly the content of a table in MSAccess
database on DataGrid control using data adapter.

Source code:-

Imports System.Data.OleDb

Public Class Form6


Dim con As OleDb.OleDbConnection
Dim da As OleDb.OleDbDataAdapter
Dim ds As New DataSet

Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
con = New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;
data source=C:\Users\Admin\Desktop\MyDataBase.mdb")
con.Open()
da = New OleDb.OleDbDataAdapter("select * from co4i", con)
da.Fill(ds, "co4i")
con.Close()

DataGridView1.DataSource = ds
DataGridView1.DataMember = "co4i"

End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As


System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs)
Handles DataGridView1.CellContentClick

End Sub
End Class
Practical 24

Output :-

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy