Dim com As System.Data.SqlClient.SqlCommand Dim adpt As System.Data.SqlClient.SqlDataAdapter Dim build As System.Data.SqlClient.SqlCommandBuilder Dim dts As DataSet Dim table As DataTable Dim DBMS As New System.Data.SqlClient.SqlConnection DBMS.ConnectionString = (cnSettings2()) Dim sql As String = "SELECT [ID],[Name],[Designation],[Present] FROM AttnDummy" DBMS.Open() com = New System.Data.SqlClient.SqlCommand(sql, DBMS) adpt = New System.Data.SqlClient.SqlDataAdapter(com) build = New System.Data.SqlClient.SqlCommandBuilder(adpt) dts = New DataSet() adpt.Fill(dts, "AttnDummy") table = dts.Tables("AttnDummy") DBMS.Close() dgv.DataSource = dts.Tables("AttnDummy") dgv.Columns(0).ReadOnly = True dgv.Columns(1).ReadOnly = True dgv.Columns(2).ReadOnly = True dgv.Columns(3).ReadOnly = False
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)