3 weeks ago
Hi Klaus,
Could you please try this:
If Not oCompany1 Is Nothing Then
oCompany1.Disconnect
System.Runtime.InteropServices.Marshal.ReleaseComObject(oCompany1)
Set oCompany1 = Nothing
End If
If Not oCompany2 Is Nothing Then
oCompany2.Disconnect
System.Runtime.InteropServices.Marshal.ReleaseComObject(oCompany2)
Set oCompany2 = Nothing
End If
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johan
Thank you for your (maybe) possible solution. Unfortunatly it is a bit tricky to use your .NET solution within VBA. But I will try to build a DLL and use that for ReleaseComObject, when I find some time. Are you thinking about a problem with Garbage Collection?
I had the possibility to try it on a FP2208 HF2 Release and there it worked without any problem. So it seems, that this is a problem within at least the current Release FP2402 HF1.
I also forgot to mention, that the sequence of disconnecting and setting to nothing does matter. If you do both in reversed order, then it does work. In older versions this did not matter...
Best Regards,
Klaus
At the moment, I cannot test with Visual Studio. But as it worked at least till Version FP2208 HF2, I would assume, that the problem is DI API in at least Version FP2402 HF1. I use Access (64bit) in many projects back since SBO 9.2 and never had this issue. I tested it with all Microsoft Office Apps with VBA and they all crashed.
Best Regards
Klaus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
9 | |
6 | |
6 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.