Doh! I am using Rick Strahl's wwSQL class, the wwSQL.Execute() function, and of course my LOCAL variables are out of scope when I call it. Thanks.
>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?
Chris McCandless
Red Sky Software