Hi All,
I have an interesting/wierd problem with a DLL that was written using VFP7. In a nutshell the DLL I have written queries a VFP database and returns the results as an ADO recordset. This DLL is then used in a classic ASP page to display the results returned to our CRM system.
Now all this was working fine on my development system, but once I moved it to our live environment it stopped working. Lots of debugging later and what 'appears' to be happening is that the DLL is ignoring the USE statement and SET DATABASE TO statements. I confirmed this by raising an error using the following Error command to see what was happening.
ERROR "Alias = "+ALIAS()+" USE NEW WORKAREA5 "+This.TableName+" "+SET("Database")
Here ALIAS() or SET("Database") returns a blank string, and because of this I get a "No table is open in the current work area" error when I start querying the VFP database.
Now what makes this all the more bizarre, is that if I use the same code to call the DLL from a Visual FoxPro program, or a VBA excel macro, in the live environment it all works fine!!
I tried re-compiling and installing the DLL and tried an IIS reset to no avail. I'm going to reboot the server tonight to see if that makes a difference.
I am stuggling to work out what exactly is going on here, if anyone has any ideas that would be great as I am fast running out of ideas!!
Chris
I have an interesting/wierd problem with a DLL that was written using VFP7. In a nutshell the DLL I have written queries a VFP database and returns the results as an ADO recordset. This DLL is then used in a classic ASP page to display the results returned to our CRM system.
Now all this was working fine on my development system, but once I moved it to our live environment it stopped working. Lots of debugging later and what 'appears' to be happening is that the DLL is ignoring the USE statement and SET DATABASE TO statements. I confirmed this by raising an error using the following Error command to see what was happening.
ERROR "Alias = "+ALIAS()+" USE NEW WORKAREA5 "+This.TableName+" "+SET("Database")
Here ALIAS() or SET("Database") returns a blank string, and because of this I get a "No table is open in the current work area" error when I start querying the VFP database.
Now what makes this all the more bizarre, is that if I use the same code to call the DLL from a Visual FoxPro program, or a VBA excel macro, in the live environment it all works fine!!
I tried re-compiling and installing the DLL and tried an IIS reset to no avail. I'm going to reboot the server tonight to see if that makes a difference.
I am stuggling to work out what exactly is going on here, if anyone has any ideas that would be great as I am fast running out of ideas!!
Chris