F
fniles
I am using VB.NET 2005 and MS Access.
I use OLEDbCommand ExecuteNonQuery to delete a record from a database.
Whenever the program gets a message, it creates a new thread to process that
message.
In the thread I open the database, then process the message.
Sometimes I get an error "Error Cannot open action query ''". Why can it
execute the query and how to fix it ?
Thank you.
Public Class Best
Dim clsEachMessage As New EachMessage
EachMessageThread = New Threading.Thread(AddressOf
clsEachMessage.ProcessMessage)
:
Public Class EachMessage
Dim adoConOLE As OleDb.OleDbConnection = Nothing
Private m_cmd As OleDb.OleDbCommand
Public Sub ProcessMessage()
adoConOLE = New OleDb.OleDbConnection
With adoConOLE
.ConnectionString = g_dbPath
.Open()
End With
m_cmd = New OleDb.OleDbCommand
With m_cmd
.Connection = adoConOLE
.CommandText = sSQL
End With
m_cmd.ExecuteNonQuery() --> Error Cannot open action query ''
I use OLEDbCommand ExecuteNonQuery to delete a record from a database.
Whenever the program gets a message, it creates a new thread to process that
message.
In the thread I open the database, then process the message.
Sometimes I get an error "Error Cannot open action query ''". Why can it
execute the query and how to fix it ?
Thank you.
Public Class Best
Dim clsEachMessage As New EachMessage
EachMessageThread = New Threading.Thread(AddressOf
clsEachMessage.ProcessMessage)
:
Public Class EachMessage
Dim adoConOLE As OleDb.OleDbConnection = Nothing
Private m_cmd As OleDb.OleDbCommand
Public Sub ProcessMessage()
adoConOLE = New OleDb.OleDbConnection
With adoConOLE
.ConnectionString = g_dbPath
.Open()
End With
m_cmd = New OleDb.OleDbCommand
With m_cmd
.Connection = adoConOLE
.CommandText = sSQL
End With
m_cmd.ExecuteNonQuery() --> Error Cannot open action query ''