banner ad

SQL error when using Python argument

| March 8, 2013 | 0 Comments
0 Flares 0 Flares ×

The following code add two arguments to the Python call. The first argument works fine but the second gives an invalid SQL error when using SELECT. The script I have attached shows the parcel string hard coded to a Parcels variable, this works OK. Can someone provide the correct string for strParcels? Note the \\ is meant to relate to a \ in the final SQL

strOwner = “Lett”
strParcels = “PARCEL_SPI = ‘1\\TP8994′”

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

Download PDF
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×

Category: Uncategorized

About the Author ()

My name is John Link.I am 26 years old. My major is Computer science and technology. I am a junior programmer with Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×