Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Shell function in Access to execute Python having Quote problems

$
0
0
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)

Viewing all articles
Browse latest Browse all 2485

Trending Articles