G
Guest
Hello.
I have a dataset with multiple datatables. For the large tables, I just
have the one target row in the datatable, and a datarow variable assigned to
that row, like:
m_loadRecordRW(dtGenerator.TableName, sSQL)
m_drGenerator = dtGenerator.Rows(0)
Private Sub m_loadRecordRW(ByVal sTableName As String, ByVal sFilter As
String)
Dim dt As DataTable
dt = m_objSQLCEDB.tbl_RW(sTableName, sFilter) ' creates the da
m_ds.Tables.Add(dt)
End Sub
When I make changes to fields in the datarow, they don't appear in the
datatable in the dataset, so the update only works if I update both the
datarow and the dataset:
Friend Sub updateGenItem(ByVal sVal As String)
m_ds.Tables(m_csTblGeneratorRW).Rows(0)(m_objGeneratorItem.fieldName) = sVal
m_drGenerator(m_objGeneratorItem.fieldName) = sVal
m_update(m_ds.Tables(m_csTblGeneratorRW))
End Sub
I don't understand why the update to the datarow doesn't appear in the
dataset.
Let me know if I need to post additional code to make the situation clear.
All I want to do is create a datarow variable pointing to a datatable in a
dataset, update a field in the datarow, update the dataadapter filled from
the datatable, and have the dataadapter recognize the update.
Thanks for any help,
-Beth
I have a dataset with multiple datatables. For the large tables, I just
have the one target row in the datatable, and a datarow variable assigned to
that row, like:
m_loadRecordRW(dtGenerator.TableName, sSQL)
m_drGenerator = dtGenerator.Rows(0)
Private Sub m_loadRecordRW(ByVal sTableName As String, ByVal sFilter As
String)
Dim dt As DataTable
dt = m_objSQLCEDB.tbl_RW(sTableName, sFilter) ' creates the da
m_ds.Tables.Add(dt)
End Sub
When I make changes to fields in the datarow, they don't appear in the
datatable in the dataset, so the update only works if I update both the
datarow and the dataset:
Friend Sub updateGenItem(ByVal sVal As String)
m_ds.Tables(m_csTblGeneratorRW).Rows(0)(m_objGeneratorItem.fieldName) = sVal
m_drGenerator(m_objGeneratorItem.fieldName) = sVal
m_update(m_ds.Tables(m_csTblGeneratorRW))
End Sub
I don't understand why the update to the datarow doesn't appear in the
dataset.
Let me know if I need to post additional code to make the situation clear.
All I want to do is create a datarow variable pointing to a datatable in a
dataset, update a field in the datarow, update the dataadapter filled from
the datatable, and have the dataadapter recognize the update.
Thanks for any help,
-Beth