I have the error:
This is the line that creates it:
in the context of:
This is from a com reference (I know unmanaged code, but I don't know how to do this in .net)
Could someone please help me? I'm not sure how to fix this...
Randall Vollen
Merrill Lynch
destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations
This is the line that creates it:
Code:
jro.CompactDatabase(strSource, strDest)
in the context of:
Code:
Public Sub CompactFile(ByVal DBFileName As String)
Dim jro As JRO.JetEngine
jro = New JRO.JetEngine
Dim tempDBFileName As String
tempDBFileName = "c:\temp\cmp.mdb"
If System.IO.File.Exists(tempDBFileName) = True Then Kill(tempDBFileName)
Dim strSource As String
Dim strDest As String
strSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBFileName
strDest = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & tempDBFileName & ";Jet OLEDB:Engine Type=5"
jro.CompactDatabase(strSource, strDest)
Kill(DBFileName)
System.IO.File.Move(tempDBFileName, DBFileName)
End Sub
This is from a com reference (I know unmanaged code, but I don't know how to do this in .net)
Could someone please help me? I'm not sure how to fix this...
Randall Vollen
Merrill Lynch