M
maxhodges
My code generated a concurrency violation when I have an ORDER BY
clause in the SQL, but it works fine without the ORder by. What gives?
Is MS not supporting ORder By in this ADO.NET disconnected DataSet
paradigm?
X "SELECT * FROM tblKanji ORDER BY CardID ASC"
O "SELECT * FROM tblKanji"
Dim sql As String = "SELECT * FROM tblKanji ORDER BY " &
orderByKey & " " & OrderDirection
Debug.WriteLine(sql)
m_da = New OleDbDataAdapter(sql, m_cn)
m_da.FillSchema(m_ds, SchemaType.Source, "Kanji")
m_da.Fill(m_ds, "Kanji")
Dim cmdBuilder As New OleDbCommandBuilder(m_da)
With m_da
.InsertCommand = cmdBuilder.GetInsertCommand
.DeleteCommand = cmdBuilder.GetDeleteCommand
.UpdateCommand = cmdBuilder.GetUpdateCommand
End With
With m_ds.Tables("Kanji")
.Rows(0)("StrokeCount") =
..Rows(0)("StrokeCount").ToString & "9"
m_da.Update(m_ds, "Kanji")
End With
clause in the SQL, but it works fine without the ORder by. What gives?
Is MS not supporting ORder By in this ADO.NET disconnected DataSet
paradigm?
X "SELECT * FROM tblKanji ORDER BY CardID ASC"
O "SELECT * FROM tblKanji"
Dim sql As String = "SELECT * FROM tblKanji ORDER BY " &
orderByKey & " " & OrderDirection
Debug.WriteLine(sql)
m_da = New OleDbDataAdapter(sql, m_cn)
m_da.FillSchema(m_ds, SchemaType.Source, "Kanji")
m_da.Fill(m_ds, "Kanji")
Dim cmdBuilder As New OleDbCommandBuilder(m_da)
With m_da
.InsertCommand = cmdBuilder.GetInsertCommand
.DeleteCommand = cmdBuilder.GetDeleteCommand
.UpdateCommand = cmdBuilder.GetUpdateCommand
End With
With m_ds.Tables("Kanji")
.Rows(0)("StrokeCount") =
..Rows(0)("StrokeCount").ToString & "9"
m_da.Update(m_ds, "Kanji")
End With