I'm trying to use RunPrepQuery in a script and I keep getting an error: "Index 1 is out of range"
Here's the line:
table = system.db.runPrepQuery("SELECT * FROM tblDummy WHERE [Column1] = '?' AND [Column2] = '?'", [string1, string2])
Where string1 is 'First' and string2 is 'Second'.
The error details show:
"Error executing system.db.runPrepQuery(SELECT * FROM tblDummy WHERE [Column1] = '?' AND [Column2] = '?', , [First, Second], )"
I've tried both '=' and 'LIKE' but still get the same error. As you can see in the details, my args are after the 2nd set of commas, not the first, where they should be.
What am I missing in my script?