P
peg
I'm new to ado.net/asp.net -
After a user fills in a webform I'm trying to add a row to the table with
its values.....
but after running this code (no errors) and i check my table - nothing is
ever added. Am I doing something wrong?
Dim rowNew As DataSet2.QCReportMainRow = DataSet21.QCReportMain.NewRow
rowNew.CientName = txtClientName.Text
rowNew.ReportName = txtClientName.Text & " - " & txtEffectiveDate.Text
rowNew.PresentedBy = txtPresentedBy.Text
rowNew.EffectiveDate = txtEffectiveDate.Text
rowNew.PreparedOn = txtPreparedOn.Text
rowNew.AnnualRate = AnnualRates.SelectedIndex
rowNew.Composite = CompRating.SelectedIndex
DataSet21.QCReportMain.Rows.Add(rowNew)
'TRYING TO SEE RECORD COUNT FROM TABLE AFTER ADD ROW
Label11.Text = DataSet21.QCReportMain.Rows.Count()
'Get AutoIncr filed of newly added row.
Session("RptID") = rowNew.ReportID
After a user fills in a webform I'm trying to add a row to the table with
its values.....
but after running this code (no errors) and i check my table - nothing is
ever added. Am I doing something wrong?
Dim rowNew As DataSet2.QCReportMainRow = DataSet21.QCReportMain.NewRow
rowNew.CientName = txtClientName.Text
rowNew.ReportName = txtClientName.Text & " - " & txtEffectiveDate.Text
rowNew.PresentedBy = txtPresentedBy.Text
rowNew.EffectiveDate = txtEffectiveDate.Text
rowNew.PreparedOn = txtPreparedOn.Text
rowNew.AnnualRate = AnnualRates.SelectedIndex
rowNew.Composite = CompRating.SelectedIndex
DataSet21.QCReportMain.Rows.Add(rowNew)
'TRYING TO SEE RECORD COUNT FROM TABLE AFTER ADD ROW
Label11.Text = DataSet21.QCReportMain.Rows.Count()
'Get AutoIncr filed of newly added row.
Session("RptID") = rowNew.ReportID