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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database and table handling after convert from 2.6 to 7.0 1

Status
Not open for further replies.

johncook

Programmer
Nov 24, 2002
154
US
I recently converted my 2.6 app to 7.0.

Let me explain what I mean by "converted". I ran whatever conversion tool comes with 7.0 that doesn't really do anything except allow the app to run under 7.0

I have done quite a bit of testing and everything works exactly the same, no problems.

Now I have just converted the free tables (everything was free tables until now) to a database. I created a database and I removed all the free tables and then I added all the free tables to the database.

Again, everything is working perfectly.

My question: My code has nothing in it that refers to the database. My code still contains the following where tables are used:

use ".\data\sysfile.dbf" in select(1) alias sysfile
select sysfile
set order to index1 && recid+...

All programs in my app are accessed via a menu program. This is not your regular menu. It is just a "main" program that creates a form and has radio buttons (one per "menu" item"). When the user selects a button the appropriate program is called and when that program quits, control always returns back to this "main/menu" program which has a "Quit" radio button.

Finally, the question: Should I be opening my database in my "main" program and should I be changing all references such as:
use ".\data\sysfile.dbf" in select(1) alias sysfile
to only say: use flexrem!sysfile or something like that?

Thanks,
John

 
John,
Unless you plan on using alternate databases, I'd just stick with the code that currently works!

Rick
 
Exactly. If it ain't broke, don't fix it.
As a side note though, if you USE a table that is part of a database, the database is automatically opened. Like when a .CDX file is opened with a table.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Normally you should open the database first and then "use" the tables in the database.
But if you say it works I wouldn't touch it.

Rob.
 
Rick, You got the star simply because you were First!

Man, You guys are fast. Thanks Rick, Dave and Rob,
I will certainly "leave it alone"!

I like that. The info about the database being automatically opened explains why it is working.

Thanks a bunch,
John
 
Hi Johncook;
Can you tell in detail how to convert fox 2.6 to VF 7.0? I have an application wroten in fx 2.6. I would like to convert it to vf 7.0.
Thanks
 
benzhaotb

If you do a search in KeyWord search on "convert" you will find many threads on the subject. The simplest answer to your question is "there is no magic converter, the best route is a total re-write".

Here is one of those threads thread184-712729

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
My suggestion for going from 2.6 to VFP is a rewrite, not a conversion. Let's face it, if the app was written in 2.6 it could probably use an overhaul by now, and as Johncook mentioned, the VFP wizard does not really convert the code, it just makes it work in VFP. Having used the wizards to convert the code, I can assure you it is very ugly code and you will be better off doing the rewrite.

You will save the time in maintenance of the code. It's the old cliché, pay me now or pay me later.

In John's situation, this will allow him to open his main tables up-front (something I usually recommend for performance purposes) and then he can select them as the table's alias name.

ie.
Select 0
Use customer


Later
Select customer


Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top