Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle migration in combination with VFP tables

Status
Not open for further replies.

Ris1

Programmer
Dec 8, 2017
26
0
0
IN
I have some tables which are specific to user and are required on each and every form say for ex. last entered value in textbox is saved user wise. So I have to update/read oracle table on every lostfocus/gotfocus of textbox. Also there are many specific setting to show data user wise.

Which option would be best in the above scenario -
1. Business Data related tables in Oracle and User specific frequently used tables in VFP.
2. All the tables in Oracle.
 
I would think your decision would hinge on whether the user specific data should be retained between sessions.

If so, then pretty much everything should be in the Oracle database.




Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
In general, I would prefer to keep everything in Oracle rather than to have to maintain two different database systems. Any strictly local user-specific data that does not need to be retained between sessions could be held in (VFP) cursors.

A couple of other points:

You talk about user-specific tables. If you mean that you have a separate table for each user, that's a bad idea. Better to have a single user table, and for it to store a user ID so that you can identify the user. In VFP, create a remote view filtered on the user ID, and treat that as the user-specific table.

I'd also query your accessing the Oracle database on every lost focus / got focus. You might well have a good reason for doing that. But it would involve a heavy overhead. If possible, you should access the data on the form's Init, and update it in the form's Save Data (or, the form doesn't have that method, when you close the form).

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
No matter if eventually stored in DBFs or Oracle tables, you don't need to save everything right away. When you load remote data, it'll be in cursors, and these are good for anything, coming from remote or DBF. In table buffered mode you'll only need to save once at moments users save or close the form. You can save more often, things like autosave are also not that complicated. If you have a save functionality, you can call it from a button click, form.release or timer event.

Ris1 said:
last entered value in textbox

When you mean an autocomplete textbox, that requires a DBF as AutoCompTable and won't simply take a workareea name it's still not impossible to finally store such data remotely and recreate it on the fly. When you look at the description of the AutoCompTable property you know VFP creates an empty one, when it's missing anyway.

I'd perhaps put this into DBFs for the mere convenience of not having to add further handling for this remote storage and recreation. You have all possibilities to determine system folders and put this into a user's local or roaming application data folders, where such things would work, too. Of course, this is lost together with user profiles, once employees quit, but you wouldn't have any essential data you need to maintain in the Oracle DB there anyway.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top