Hello all,
we develop a VFP software for social services, it is used by many clients on individual computers. The use of SQL servers is to come in the future, but will rather be something for customers where the data is on a server. For customers with single installations, free VFP tables are still very important. Bit by bit, we want to migrate the software to .Net. To do this, we need access to the VFP tables. Currently, we have developed a VFP-Com server for this purpose, which we use to fetch the data to .Net and also write them back again. The data is loaded via CursorAdapter and transferred via Json or as objects.
Now we have become aware of X# and find it very interesting. Here it is quite easy to load VFP data with a USE and use it in .Net projects. But how does this work technically? Is it the same as in VFP? There are some problems with direct access via USE (e.g. network crashes). What is the best way to load data from VFP tables in X# so that the whole thing also works securely in the network and with access by several users? Is there also something like CursorAdapter or do I not need them at all? Where can I find documentation on this topic?
If X# is a good and secure way of accessing data and if some of the VFP code can be transferred to .Net, that would be a great invention that should be dealt with more intensively.
Many thanks for some beginner input
Markus
Data access with X# to VFP tables
Data access with X# to VFP tables
Hello Markus,
Wolfgang pointed me to MVVM. Don’t know this is the best option. Why not keep the VFP.com , and do the Rest in X# .
Im also using VFP since FP2.5 Dos, but some say keep VFP some say don’t use it anymore..
Maybe for single user a switch to SQLite would be an option. Or the multiuser version ( Valentina).
For me I have switched to Postgres ( thanks to Wolfang…).
BR Rainer
Wolfgang pointed me to MVVM. Don’t know this is the best option. Why not keep the VFP.com , and do the Rest in X# .
Im also using VFP since FP2.5 Dos, but some say keep VFP some say don’t use it anymore..
Maybe for single user a switch to SQLite would be an option. Or the multiuser version ( Valentina).
For me I have switched to Postgres ( thanks to Wolfang…).
BR Rainer
Data access with X# to VFP tables
Hello Rainer,
yes, we use .Net (with C#), WPF with MVVM and the EF for a while. I know all that. Our problem is that the VFP application has a lot of forms and we have to convert them to cursor adapters first, then we can switch to another database. At the same time, we want to migrate various modules to .Net, so we need read and write access to the existing VFP tables. Access via Com using our service works, but COM has its own peculiarities (must be registered or requires a manifest) and makes debugging difficult. The idea was therefore to access the VFP data directly from .Net using X#. We would be interested to know how this is technically implemented. Is it also possible internally via COM or are the tables opened directly as files? How reliably does this work (also multi-user and network)? Does anyone have experience? If X# is not an alternative, we will stay with the VFP ComService.
Many thanks
Markus
yes, we use .Net (with C#), WPF with MVVM and the EF for a while. I know all that. Our problem is that the VFP application has a lot of forms and we have to convert them to cursor adapters first, then we can switch to another database. At the same time, we want to migrate various modules to .Net, so we need read and write access to the existing VFP tables. Access via Com using our service works, but COM has its own peculiarities (must be registered or requires a manifest) and makes debugging difficult. The idea was therefore to access the VFP data directly from .Net using X#. We would be interested to know how this is technically implemented. Is it also possible internally via COM or are the tables opened directly as files? How reliably does this work (also multi-user and network)? Does anyone have experience? If X# is not an alternative, we will stay with the VFP ComService.
Many thanks
Markus
Data access with X# to VFP tables
Hallo, Markus, sounds like a lot of work, hope you have plugins/ wizards to help you.
And hope it’s more than bringing VFP SW to .net.
BR Rainer
And hope it’s more than bringing VFP SW to .net.
BR Rainer
Data access with X# to VFP tables
Markus,
The VFP data access in X# works through a native X# data access layer (which we call RDD). This is written in X# of course.
We have added what we call "User Defined Commands" that translate the familiar VFP commands such as USE, SKIP, SCAN etc to function calls which in their turn call methods from the RDD layer.
About the reliability for multi user and in a network: this is just as reliable or unreliable as VFP.
You have to make sure that the caching parameters for shared file access are set correctly at every workstation that opens and updates a file.
Robert
The VFP data access in X# works through a native X# data access layer (which we call RDD). This is written in X# of course.
We have added what we call "User Defined Commands" that translate the familiar VFP commands such as USE, SKIP, SCAN etc to function calls which in their turn call methods from the RDD layer.
About the reliability for multi user and in a network: this is just as reliable or unreliable as VFP.
You have to make sure that the caching parameters for shared file access are set correctly at every workstation that opens and updates a file.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Data access with X# to VFP tables
Hi Markus,
about the architecture of the DBF access in X#: as you may know, X# comes from VO and like Clipper 5 and VO it implements data access to DBF tables using so called RDDs (Replaceable Database Driver).
Then there is the functional layer like Clipper had it.
Over this, using the powerful preprocessor, there are both a class layer with the DBServer class (from VO) and a command layer like Clipper and VFP with "use area".
Since I'm a VO guy and have absolutely no knowledge about VFP, maybe others can explain you better what you can do.
Wolfgang
about the architecture of the DBF access in X#: as you may know, X# comes from VO and like Clipper 5 and VO it implements data access to DBF tables using so called RDDs (Replaceable Database Driver).
Then there is the functional layer like Clipper had it.
Over this, using the powerful preprocessor, there are both a class layer with the DBServer class (from VO) and a command layer like Clipper and VFP with "use area".
Since I'm a VO guy and have absolutely no knowledge about VFP, maybe others can explain you better what you can do.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Data access with X# to VFP tables
Hello and thank you for the answers!
Since I have absolutely no idea about VO, these statements rather motivate me to continue with my own VFP service. Or are there VFP developers here who already have experience with data access to native VFP tables using X#? Does anyone do this and already have practical experience?
Many thanks
Markus
Since I have absolutely no idea about VO, these statements rather motivate me to continue with my own VFP service. Or are there VFP developers here who already have experience with data access to native VFP tables using X#? Does anyone do this and already have practical experience?
Many thanks
Markus
Data access with X# to VFP tables
Hi Markus,
maybe it is better to show a few lines of code to see how you would like to access your tables from your application. Then someone could step in and says how this can work with X#
Wolfgang
maybe it is better to show a few lines of code to see how you would like to access your tables from your application. Then someone could step in and says how this can work with X#
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it