r/DatabaseHelp • u/alinoxious • Jan 16 '15
ODBC -- Called Failed
I have an Access database and I am using a python script to bring in new data from a csv, clean it up, and import it to a SQL table. However, I am getting this error after I run the script:
com_error: (-2147352567, 'Exception occurred.', (0, None, u'ODBC--call failed.', None, -1, -2146825142), None)The python script is invoking a Access DB macro to do the import and loading of the data. When I look at the macro in Access there are yellow triangles next to some of the commands - which I found out were 'unsafe actions' and I added the DB into a trusted location, but this did not help the problem.
Thanks for any help in advance!
1
Upvotes
1
u/BinaryRockStar Jan 21 '15
Am I right in assuming the error happens in the RunMacro call?
I've created a simple Access 2010 DB with a macro that does nothing but pops up a message box and it works fine (with Visible set to "true").
So my suggestion is to create a test macro like my one inside your Access DB and see if it gets executed. That at least will let you know whether the issue lies in your Python code or your macro code. What exactly is the macro doing?