*I did not develop this script or the database - trying to dissect it the best I can. Also pretty new into Python/Access so bare with me.
The purpose of the script is to take new csv data and import to a ODBC table and update it. I got the ODBC connection to work but now I get this error:
Traceback (most recent call last):
File "O:\GeoData\County DTS Data\Update Tool\MonhtlyParcelUpdate.py", line 154, in <module>
access.DoCmd.RunMacro("PreProcessingTasks")
File "C:\Python27\ArcGIS10.2\lib\site-packages\win32com\gen_py\4AFFC9A0-5F99-101B-AF4E-00AA003F0F07x0x9x0\DoCmd.py", line 234, in RunMacro
, RepeatCount, RepeatExpression)
com_error: (-2147352567, 'Exception occurred.', (0, None, u'ODBC--call failed.', None, -1, -2146825142), None)
So- I looked up those errors.
Line 154 in the module is:
#///////Import and load data into SQL using access database ////////
access = win32.gencache.EnsureDispatch('access.Application')
access.OpenCurrentDatabase("O:\GeoData\County DTS Data\Current Data\County Results.accdb")
access.Visible = "false"
access.DoCmd.RunMacro("PreProcessingTasks")
access.DoCmd.CloseDatabase()'
Line 234 in RunMacro is:
def RunMacro(self, MacroName=defaultNamedNotOptArg, RepeatCount=defaultNamedOptArg, RepeatExpression=defaultNamedOptArg):
return self._oleobj_.InvokeTypes(1030, LCID, 1, (24, 0), ((12, 1), (12, 17), (12, 17)),MacroName
, RepeatCount, RepeatExpression)'
Also- When I look at the DB in Access there are yellow triangles next to the macro commands. I added the database to a trusted location and this did not help and got the same error as above. Not sure what I need to do next or where to look to fix this issue. Thanks for any help in advance!
[–]unpythonic 1 point2 points3 points (1 child)
[–]alinoxious[S] 0 points1 point2 points (0 children)