Hello all,
My python script runs well and returns all tables from mdb with arcpy.ListTables() command when i run a script in IDLE(default IDE) or python window from arcmap. But when I try to run the same script from cmd arcpy.ListTables() returns blank list []. What could be the problem?And what is the solution? As I am calling this script in my C# desktop application.
import xlrd
import datetime
import os
import sys
#sys.path.append("C:\Program Files\ArcGIS\Desktop10.0\arcpy")
import arcpy
#arcpy.ResetEnvironments()
arcpy.env.workspace = r"D:/Final/gdb_workspace/New Personal Geodatabase.mdb"
#Get and print a list of tables
tables = arcpy.ListTables()
print tables
for table in tables:
print table