>>>The set database is empty at the moment.
>>
>>This is what I had expected. If a database is open but no database is set, vfp nevertheless (and fortunately!) finds stored procedures and calls them.
>>
>>
>>
>>solution 1 (from AMRI, a third party RI code builder):
>>
#DEFINE _THIS_DBC_ TheDbcName
>>Use _THIS_DBC_ throughout other SP code.
>>
>>
>>
>>solution 2:
>>find out where you are with
>>
SYS(16,Program(-1))
>>which includes the DCT file name in it's result.
>>You can easily guess the DBC file name and SET DATABASE TO (dbc file name).
>>
>>Bye, Olaf.
>
>In other words, we should put set database to ... in all our SPs that open tables?
I looked at every function in SP and found only a few which didn't use DatabaseName!TableName. Most of our functions used it already. I guess, we need to change few functions to use database prefix and this would solve our problem.
If it's not broken, fix it until it is.
My Blog