J
Joel Whitehouse
Hello all:
After the 38th iteration of a loop that calls this code, I get the
following error:
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in Antenna Test
Range Control.exe
Additional information: Unspecified error
Here's my code:
Private Sub SendQuery(ByVal query As String)
Dim command As New ADODB.Command
'Create a connection object
Dim adoConnection As New ADODB.Connection
adoConnection.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\Antenna\My Documents\testdata.mdb;"
adoConnection.Open() '<-----------------Error happens here
command.ActiveConnection = adoConnection
command.ActiveConnection.BeginTrans()
command.CommandText = query
command.CommandType = CommandTypeEnum.adCmdText
command.Execute()
command.ActiveConnection.CommitTrans()
If adoConnection.State = ObjectStateEnum.adStateOpen Then
adoConnection.Close()
end if
adoConnection = Nothing
End Sub
Any ideas? Thanks!
-Joel
After the 38th iteration of a loop that calls this code, I get the
following error:
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in Antenna Test
Range Control.exe
Additional information: Unspecified error
Here's my code:
Private Sub SendQuery(ByVal query As String)
Dim command As New ADODB.Command
'Create a connection object
Dim adoConnection As New ADODB.Connection
adoConnection.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\Antenna\My Documents\testdata.mdb;"
adoConnection.Open() '<-----------------Error happens here
command.ActiveConnection = adoConnection
command.ActiveConnection.BeginTrans()
command.CommandText = query
command.CommandType = CommandTypeEnum.adCmdText
command.Execute()
command.ActiveConnection.CommitTrans()
If adoConnection.State = ObjectStateEnum.adStateOpen Then
adoConnection.Close()
end if
adoConnection = Nothing
End Sub
Any ideas? Thanks!
-Joel