birddseedd
Member
- Joined
- Nov 18, 2008
- Messages
- 6
- Programming Experience
- Beginner
My goal is too have a user chose a date with a date picker control, then the app will fill a data grid view with the "membername" and "present" columns for any row in the table in which the "date" column matches the date picker control.
This is the code im using to fill a datagridview with data from a sql table.
Dim sqlConn As New SqlConnection("connection string")
Dim sqlComm As New SqlCommand("SELECT * FROM memberlist", sqlConn)
Dim sqlAdptr As New SqlDataAdapter(sqlComm)
Dim ds As New DataSet
sqlAdptr.Fill(ds, "memberlist")
DataGridView1.DataSource = ds.Tables("memberlist")
This works; it is pulling 3 columns (date, membername, present). however...
I only want it to add the membername and present columns
Also I only want it to add data to the grid view for rows that have the same date as a date time picker in the form.
thanks for your help.
This is the code im using to fill a datagridview with data from a sql table.
Dim sqlConn As New SqlConnection("connection string")
Dim sqlComm As New SqlCommand("SELECT * FROM memberlist", sqlConn)
Dim sqlAdptr As New SqlDataAdapter(sqlComm)
Dim ds As New DataSet
sqlAdptr.Fill(ds, "memberlist")
DataGridView1.DataSource = ds.Tables("memberlist")
This works; it is pulling 3 columns (date, membername, present). however...
I only want it to add the membername and present columns
Also I only want it to add data to the grid view for rows that have the same date as a date time picker in the form.
thanks for your help.