Chris,
Variables must be in scope when SQLExec is called. For example, I have a oSQL object that I created which takes care of handling connections, error messages and such, and I use it this way:
oSQL.ExecuteSQL(cSQLString, "NewAlias")
Since LOCAL variables are no longer in scope inside the oSQL.ExecuteSQL() function, I can't use them. But yes, PRIVATE vars would work I guess; I don't use PRIVATEs! :)
Likewise, I can't use "?THISFORM.SomeProperty", because once inside oSQL, "THISFORM" doesn't mean anything!
>Thanks for the tip about using VFP variables as parameters with stored procedures. I think that is the way I will go. I have done a little testing with this, and it appears as though the variables must be PRIVATE, rather than LOCAL. Is this what you have found?
Sylvain Demers