Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Native to SQL
Message
From
06/10/2007 05:35:58
 
 
To
05/10/2007 13:29:18
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01259011
Message ID:
01259135
Views:
17
>I have developed a mature big application ( 200 installations in last 5 years) that is based on VPF native tables. Most of the business rules are on the form level. Most of the insert, update, and retrieve of data are based on SQL commands. I do not use views at all.

If you operate on cursors (either with or wothout CA) most of the time, it should be possible as well.
>
>Lately some of my customers require to transfer the date into SQL database, for good reasons: security, huge tables (millions of records), remote access etc.
>
>I have two options:
>
>a) Copy the existing project into a NEW project and modify the existing application to work only with SQL databases.
>
>b) Modify the existing application on the logic:
>if lsqlmode
> new code for sqldatabase
>else
> the oldcode
>endif
>

Neither, if possible<g>. If you have already a class based program, create a new layer working off SQL only and put all the new code in that layer. Corollary: you must isolate the Datahandling into methods without any chaff, no eliminate code copy.

Even better: create a data or data access layer <vbg>. You might look up Andy Kramek's thought's on data access layer: while written before Cursoradapters were there it has some very nice points. Don't remember in which book or if it is on his website as well.

my 0.02 EUR

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform