VFP9 with CDX concerns ?

This forum is meant for questions about the Visual FoxPro Language support in X#.

User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

VFP9 with CDX concerns ?

Post by robert »

Matt,
FoxProMatt_MattSlay wrote:Robert - What about the Table Buffering mechanism that is very commonly used in VFP apps that access DBFs?

You got something up your sleeve for that?
Yes we have something planned for table buffering too...
Maybe not with exactly the same syntax (CursorSetProp() and TableUpdate()) but very similar.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
FoxProMatt

VFP9 with CDX concerns ?

Post by FoxProMatt »

And there is TableRevert() function.

The way buffering works, if you make a change and you want to close the table but NOT commit your changes, you actually have to call TableRevert() function to clear the changes before FoxPro will let you close the table or shut down the app. I forget all the details, but it remember having to deal with TableRevert() just as much as TableUpdate().
User avatar
robert
Posts: 4518
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

VFP9 with CDX concerns ?

Post by robert »

Matt,
We will work on this. But we need to some research first to see how FoxPro deals with this in a multi user environment. What does it do with appends and autonumber fields ? What does it do when multiple records were updated and there is a conflict with changes from another user. Will it abort all changes or just the ones with conflicts? And if you run in "buffered" mode, do you then see changes made by other users, etc, etc. ? There is some documentation about this in the VFP docs, but many things are not described in detail (and unfortunately the source code is also not available).

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
FoxProMatt

VFP9 with CDX concerns ?

Post by FoxProMatt »

Yes, these are all great questions and concerns.

I don't think I can be of very much help because I actually do not use Buffering in my app(s), and have not in a very long time, because I use Sql Server and SqlExec(), and all of these issues are handled in my Data Access framework to get changes in the local cursor pushed back into Sql Server.

However, I know that this is a very commonly used aspect of VFP apps.

In fact, I did a little poll back in late Nov 2019 on the Leafe ProFox mailing list with a question titled "How common is Table Buffering with DBFs?"

Here are the replies to that question, in case it can help you see what they responded (and *who* responded)

https://leafe.com/archives/full_thread/514457


Here is the question I asked, but you will need to follow the link above to see all the replies:
For a while when my app was still on DBFs (instead of Sql Server) I used Table Buffering, with TableUpdate() and TableRevert() on all my CRUD forms. I remember that it could get tricky keeping it all working correctly in the UI, but in the end I had a pretty good pattern in place. I took the path of making the user take the form into Edit Mode, then they could Save or Cancel, and I handled TableUpdate() or TableRevert() accordingly.

Anyway, I'm just trying to get a feel for how broadly used is Table Buffering is in DBF-based apps?? It it a low number like 10%, or maybe 30%?

Did any of the other XBase language every have this table buffering paradigm in them?

I'm probing into this as (self-assigned) research so I can enlighten the X# Dev Team if this is something they may face as a common pattern in VFP apps if anyone tried to move this sort of app over to X# one day.
Post Reply