A
alexhatzisavas
Hi all.
I'm using Access VBA to automate Excel, and sometimes I get an ODBC error.
Here's the scenario:
The User runs a Query in Access.
If the resulting recordset is bigger than 65.536 (XL's limit), I'm NOT
'throwing' the data from Access into XL.
Instead, I use Access VBA and Automation to create an XL PivotTable that's
directly connected to the data in Access (using the PivotTable's capability
to link to 'External Data Sources', and the CreatePivotTable method of a
PivotCache object).
All goes well, but sometimes i get an error message.
The error happens when, in Access VBA, i use the CreatePivotTable method
with a PivotCache object.
Here's the Access error message:
ODBC Microsoft Access Driver Login Failed.
The database has been placed in a state by user 'Admin' on machine '...my
machine...' that prevents it from being opened or locked.
I then get the XL error message:
Application- or object-defined error (code: 1004).
This is rather rare, but it does happen.
If i close and then open up Access again, the problem goes away.
Any comments/suggestions would be very welcome.
Thank you,
Alex
I'm using Access VBA to automate Excel, and sometimes I get an ODBC error.
Here's the scenario:
The User runs a Query in Access.
If the resulting recordset is bigger than 65.536 (XL's limit), I'm NOT
'throwing' the data from Access into XL.
Instead, I use Access VBA and Automation to create an XL PivotTable that's
directly connected to the data in Access (using the PivotTable's capability
to link to 'External Data Sources', and the CreatePivotTable method of a
PivotCache object).
All goes well, but sometimes i get an error message.
The error happens when, in Access VBA, i use the CreatePivotTable method
with a PivotCache object.
Here's the Access error message:
ODBC Microsoft Access Driver Login Failed.
The database has been placed in a state by user 'Admin' on machine '...my
machine...' that prevents it from being opened or locked.
I then get the XL error message:
Application- or object-defined error (code: 1004).
This is rather rare, but it does happen.
If i close and then open up Access again, the problem goes away.
Any comments/suggestions would be very welcome.
Thank you,
Alex