G
Guest
sSQL = "Select * from SeqGen where SG_NumType = '" & which & "'
oSGRs = New SqlDataAdapter(sSQL, oConn
oSGRs.MissingSchemaAction = MissingSchemaAction.AddWithKe
RecCnt = oSGRs.Fill(oDataSet, "SeqGen"
If RecCnt = 0 The
myRow = oDataSet.Tables("SeqGen").NewRow(
myRow("SG_NumType") = UCase(which
myRow("SG_CurrentValue") =
oDataSet.Tables("SeqGen").Rows.Add(myRow
oSGRs.Update(oDataSet, "SeqGen"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Update requires a valid InsertCommand when passed DataRow collection with new rows
Source Error:
Line 85: myRow("SG_CurrentValue") =
Line 86: oDataSet.Tables("SeqGen").Rows.Add(myRow
Line 87: oSGRs.Update(oDataSet, "SeqGen"
Question: Can't I update a table the old way like I did in ADO? Help
Thanks, Don
oSGRs = New SqlDataAdapter(sSQL, oConn
oSGRs.MissingSchemaAction = MissingSchemaAction.AddWithKe
RecCnt = oSGRs.Fill(oDataSet, "SeqGen"
If RecCnt = 0 The
myRow = oDataSet.Tables("SeqGen").NewRow(
myRow("SG_NumType") = UCase(which
myRow("SG_CurrentValue") =
oDataSet.Tables("SeqGen").Rows.Add(myRow
oSGRs.Update(oDataSet, "SeqGen"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Update requires a valid InsertCommand when passed DataRow collection with new rows
Source Error:
Line 85: myRow("SG_CurrentValue") =
Line 86: oDataSet.Tables("SeqGen").Rows.Add(myRow
Line 87: oSGRs.Update(oDataSet, "SeqGen"
Question: Can't I update a table the old way like I did in ADO? Help
Thanks, Don