G
Guest
I have wrote function that upgrades access database
Public Function UpdateDataTable(ByRef po_dt As System.Data.DataTable) As Boolea
Dim conn As New OleDbConnection(mstrConnectionString
Dim sTblName As String = po_dt.TableNam
Dim dt As Data.DataTabl
Dim da As New OleDbDataAdapter("SELECT * FROM " & sTblName, conn
Dim custCB As OleDbCommandBuilder = New OleDbCommandBuilder(da
Tr
dt = po_d
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.Deleted)
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.ModifiedCurrent)
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.Added)
UpdateDataTable = Tru
Catch ex As Exceptio
UpdateDataTable = Fals
Throw e
End Tr
End Functio
That function returns me true (update success) but I can not see it in the data base. Someone knows what can be a problem?
Public Function UpdateDataTable(ByRef po_dt As System.Data.DataTable) As Boolea
Dim conn As New OleDbConnection(mstrConnectionString
Dim sTblName As String = po_dt.TableNam
Dim dt As Data.DataTabl
Dim da As New OleDbDataAdapter("SELECT * FROM " & sTblName, conn
Dim custCB As OleDbCommandBuilder = New OleDbCommandBuilder(da
Tr
dt = po_d
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.Deleted)
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.ModifiedCurrent)
da.Update(dt.Select(Nothing, Nothing, DataViewRowState.Added)
UpdateDataTable = Tru
Catch ex As Exceptio
UpdateDataTable = Fals
Throw e
End Tr
End Functio
That function returns me true (update success) but I can not see it in the data base. Someone knows what can be a problem?