After I have retrieved my data from my access database, I would like to insert text into one of the columns in a new row. Is this possible? Here's a snipit of my code I use to retrieve the data from access:
If con.State = ConnectionState.Closed Then con.Open()
sdr = cmd.ExecuteReader()
rtime = Now()
While sdr.Read = True
If sdr.Item("total_time") <> "0" Then
rtime_in = sdr.Item("clock_in")
rtime_out = sdr.Item("clock_out")
rdtotal_time = rtime_out.Subtract(rtime_in)
rtotal_time = rtotal_time.Add(rdtotal_time)
End If
End While
sdr.Close()
rstotal_time = rtotal_time.Duration.ToString
timelabel.Text = rstotal_time
If con.State = ConnectionState.Closed Then con.Open()
myDA = New OleDbDataAdapter(cmd)
myDataSet = New DataSet()
myDA.Fill(myDataSet)
DataGridView1.DataSource = myDataSet.Tables("Table").DefaultView
It's the rtotal_time value that I need to insert into the datagrid.
Any help would be appreciated.
If con.State = ConnectionState.Closed Then con.Open()
sdr = cmd.ExecuteReader()
rtime = Now()
While sdr.Read = True
If sdr.Item("total_time") <> "0" Then
rtime_in = sdr.Item("clock_in")
rtime_out = sdr.Item("clock_out")
rdtotal_time = rtime_out.Subtract(rtime_in)
rtotal_time = rtotal_time.Add(rdtotal_time)
End If
End While
sdr.Close()
rstotal_time = rtotal_time.Duration.ToString
timelabel.Text = rstotal_time
If con.State = ConnectionState.Closed Then con.Open()
myDA = New OleDbDataAdapter(cmd)
myDataSet = New DataSet()
myDA.Fill(myDataSet)
DataGridView1.DataSource = myDataSet.Tables("Table").DefaultView
It's the rtotal_time value that I need to insert into the datagrid.
Any help would be appreciated.