Update Data into Database with DataAdapter
-
Hi all, Please assist, When I try to assign a DataTable to a Table that existed in Dataset I got this error : " Property 'Item' is 'ReadOnly'." The Scenario is: After select from TableB with conditions if have got Data then Insert Into TableA.
Dim dTable As New DataTable
Dim ds As New DataSet
Dim dAdp As New OdbcDataAdapter("Select Top 1 * From TableA Where 1<>1 ", ODBCcon)
dAdp.Fill(ds, "TableA")sQuery = "Select * From TableB Where ...."
dTable = SSLGetDataTable(sQuery)
If dTable.Rows.Count > 0 Then
ds.Tables("TableA") = dTable
dAdp.Update(ds, "TableA")
End IfThanks and Best Regards
-
Hi all, Please assist, When I try to assign a DataTable to a Table that existed in Dataset I got this error : " Property 'Item' is 'ReadOnly'." The Scenario is: After select from TableB with conditions if have got Data then Insert Into TableA.
Dim dTable As New DataTable
Dim ds As New DataSet
Dim dAdp As New OdbcDataAdapter("Select Top 1 * From TableA Where 1<>1 ", ODBCcon)
dAdp.Fill(ds, "TableA")sQuery = "Select * From TableB Where ...."
dTable = SSLGetDataTable(sQuery)
If dTable.Rows.Count > 0 Then
ds.Tables("TableA") = dTable
dAdp.Update(ds, "TableA")
End IfThanks and Best Regards
Yep - the error message is correct.... Try .add ing the table to the DataSet
C# has already designed away most of the tedium of C++.