Short term FoxPro compatible Database layer
In the last weeks the X# devteam has discussed the FoxPro Short term database support. We will work on this in the "Delft" project.
The "Short term" solution to add FoxPro database and embedded support to X# will involve using the FoxPro runtime. This will look a bit like the "Bring Your Own Runtime" (BYOR) that we had in the beginning of X# where we were supporting development against the Vulcan Runtime.
We will create a special class in FoxPro and expose that class using COM. This class will have entry points that allow to open a dbf, close a dbf, navigate and update a Dbf. The class will also have methods that can be called to execute SQL statements, such as "create table", "Select ", "create cursor", Update, Delete and Insert
Since the user can use local variables and memory variables in queries we will add the ability to add and remove (public) memory variables in the running foxpro applications.
User defined functions can be supported as long as they are available as FoxPro compatible PRG . We will make them known to the FoxPro COM object so it can do a "SET PROCEDURE TO
In the X# side we will create a special FoxPro RDD that loads the COM server and calls into the methods of this server. This RDD assembly will also expose several methods to open and close a FoxPro database (DBC) and to execute the FoxPro embedded SQL commands.
When you open a table in FoxPro then the COM component will return the area number, alias, the structure definition and the current state ("eof", "bof", "recno", "lastrec" etc.) By doing this the client RDD does not have to call the com server repeatedly for these values. Record navigation routines (Skip, GoTop etc) will return a logical result and also the state.