D
DaveS
Hi!
I am exeuting an INSERT query from within a public
function. Is there any way to know if the entire INSERT
query completed updating in the database? It appears that
code continues to execute even before the query has
finished. However, when I check cmd.State.ToString, it
says "Open", which gives me no info on the status of the
query.
Is there a more robust way to execute an Update query in
the ADO.NET world?
myGlobals.connBE is an open connection to an Access
database.
Public Function ActionQuery(ByVal strActionSQL As String)
As String
Dim cmd As OleDbCommand = New OleDbCommand
With cmd
.Connection = myGlobals.connBE
.CommandType = CommandType.Text
.CommandText = strActionSQL
Try
.ExecuteNonQuery()
Return String.Empty
Catch ex As Exception
ErrorHandler(...)
Return ex.ToString
End Try
End With
End Function
I am exeuting an INSERT query from within a public
function. Is there any way to know if the entire INSERT
query completed updating in the database? It appears that
code continues to execute even before the query has
finished. However, when I check cmd.State.ToString, it
says "Open", which gives me no info on the status of the
query.
Is there a more robust way to execute an Update query in
the ADO.NET world?
myGlobals.connBE is an open connection to an Access
database.
Public Function ActionQuery(ByVal strActionSQL As String)
As String
Dim cmd As OleDbCommand = New OleDbCommand
With cmd
.Connection = myGlobals.connBE
.CommandType = CommandType.Text
.CommandText = strActionSQL
Try
.ExecuteNonQuery()
Return String.Empty
Catch ex As Exception
ErrorHandler(...)
Return ex.ToString
End Try
End With
End Function