2008 Macro Errors in 2011 on conn.open to an Access DB

Hi There

I built a macro that connects to an Microsoft Access DB. It was built when we had SolidWorks 2008 installed.

We have upgraded SolidWorks to 2011 and now the macro does not work on some of the PC's some of the time. OS is XP sp3

It is very sporadic. Here are the connection details

Dim conn       As ADODB.Connection

Dim strConn   As String

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & GetReportsDB

Set conn = New ADODB.Connection

   

crashes here on some machines but not every time the macro is run

conn.Open strConn

When the code hits this line the error that is caught is

2147467259 Unspecified Error

All the references have not changed. The only thing that has changed is SolidWorks.

On the machines that it is sporadic, the user either has re-start SolidWorks or re-boot their PC for it to work again.

Then for the next 30 mins or so it works then maybe not after that.

Any info would be grateful

Thanks

Declan

SolidworksApi macros