I'm trying to run an insert from Python and I get an "incorrect column name" error, but it's displaying the value of the column I'm trying to extract from irow
iteration.
Is there something I'm doing wrong here? I'm explicitly declaring column names below, I don't see how its confusing the values for the column names?
for irow in cursor.execute(storedProc):
strObj = str(irow[0])
strGrp = str(irow[1])
print(strObj)
print(strGrp)
try:
response = requests.get(irow[2], timeout=30, auth=('user', 'pw'))
response.raise_for_status()
# Code here will only run if the request is successful
# print(response.json())
strJson = "Stuff"
#str(response.json())
cursor.execute("INSERT INTO dbo.ApiResults ([Object], [Group], json) VALUES ('"+strObj+"','"+strGrp+"','"+strJson+"');")