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 .InteropService s.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.Connectio n
adoConnection.C onnectionString =
"Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Docum ents and
Settings\Antenn a\My Documents\testd ata.mdb;"
adoConnection.O pen() '<-----------------Error happens here
command.ActiveC onnection = adoConnection
command.ActiveC onnection.Begin Trans()
command.Command Text = query
command.Command Type = CommandTypeEnum .adCmdText
command.Execute ()
command.ActiveC onnection.Commi tTrans()
If adoConnection.S tate = ObjectStateEnum .adStateOpen Then
adoConnection.C lose()
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 .InteropService s.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.Connectio n
adoConnection.C onnectionString =
"Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Docum ents and
Settings\Antenn a\My Documents\testd ata.mdb;"
adoConnection.O pen() '<-----------------Error happens here
command.ActiveC onnection = adoConnection
command.ActiveC onnection.Begin Trans()
command.Command Text = query
command.Command Type = CommandTypeEnum .adCmdText
command.Execute ()
command.ActiveC onnection.Commi tTrans()
If adoConnection.S tate = ObjectStateEnum .adStateOpen Then
adoConnection.C lose()
end if
adoConnection = Nothing
End Sub
Any ideas? Thanks!
-Joel
Comment