Ok, I'll admit that it's been way too many years than I'd like to admit since I did this out of VFP, but here goes.
Got a connection to my SQL DB that works, tested by passing an SQL string like "Select * from [table]" with
msql = "Select * from [table]
x=SQLEXEC(mconn, msql, 'Results')
And I get a cursor names Results with, you guessed it, results
But,
lastname = 'Crawford'
fname = 'Harold'
msql = "exec LookupbyName ?Lname ' " + lastname + " ',?fname '" + fname + " ' "
x=SQLEXEC(mconn, msql, 'CSO')
I get a box asking for the value of 'Lname', type that in,
x returns as -1, with the error message "Incorrect syntax near 'Crawford'
?msql shows "exec LookupbyName ?Lname 'Crawford', ?fname 'Harold' "
What am I missing?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place