Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim myconnection As New SqlConnection("server=THEJASVI-PC\SQLEXPRESS;database=emp;uid=sa;pwd=2x12") myconnection.Open() ds = New DataSet() s = "select * from emp_details" Dim da As New SqlDataAdapter(s, myconnection) da.Fill(ds, "emp_details") dgvEmployeedetails.DataSource = ds.DefaultViewManager End Sub
dgvEmployeedetails.DataSource = ds.DefaultViewManager
dgvEmployeedetails.DataSource = ds.tables(0)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)