bobm007

Shell function in Access to execute Python having Quote problems

Discussion created by bobm007 on Mar 11, 2013
Latest reply on Mar 12, 2013 by bobm007
Hi,

Member 'curtvprice' suggested putting triple double quotes around the second line below in order the SQL in a Python ARCGIS to work. It works great thanks Curt, but I need to acheive the same result using a string variable. I've tried a lot of variations to the third line below but keep getting a SQL invalid type error. The reason I need a variable is I'll be using a Dataset in Access that will have one or more PARCELS so each Parcel will need to included by adding an 'OR' and a new Parcel variable.
Any ideas? 

    strOwner = """Lett"""
    strParcelsVar = "PARCEL_SPI = '1/TP8994'"
    strParcels = """ & strParcelsVar & """


retVal = Shell("cmd.exe /K S:\MID_Owners_Database_Workspace\OwnerProperty.py " & strOwner & " " & strParcels, 1)

Outcomes