Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter with free tables
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01227239
Message ID:
01227305
Views:
18
Hi

I use the CA with free tables all the time. I just open the table using the "USE" command and then use the "CursorAttach" method. The reason I do this is to avoid having two copies of the table open because the normal method for a cursor adapter is to open the table and then retrieve all the data specified in your "SelectCMD" into a cursor. I did not want to waste the time duplicating the data so I just open the table myself and attached it to the cursorAdapter.

You may wonder why I did not use free tables directly and forget about cursoradpters. The reason was that I wanted to build an n-tier system so it could be easily changed to a database server backend later if needed. The second reason is that I create my cursoradpater classes automatically from my data dictionary. The classes then contains all the field default values and code I want to run when new records are created and this can be adjusted on site by simply changing the values in the data dictionary and regenerating the cursoradpaters. The third reason was that I wanted to experiment with free tables on a web server that could be sent to the local workstation and opened by the "cursoradpater" creating a kind of poor man's database server.

Having experimented with all this I now develop and deploy applications for customers on my servers which they access using Terminal Services and Remote Desktop. So I really do not need cursoradpaters now because the data is always local but it did force me to develop a nice clean n-tiear architecture which works well in this scenario.

Regards,
Simon White


>Having used the CursorAdapter with DBC-based tables and with Access tables, I'm now needing to use it with free tables. I can't see anything that says it won't work with free tables, however the builder does give you a textbox to select the DBC when you choose "Native" as the DataSourceType. I suppose if it works with free tables, I'd have to use the MAKETRANSACTABLE() function. And what's the command/function to make the results of a standard SQL query updateable? I haven't had occasion to use that, but I think it exists, but can't remember the name and haven't found it in help, so far.
Simon White
dCipher Computing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform