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

Foxpro 2.5a

Status
Not open for further replies.

DeweyK

MIS
Mar 26, 2000
5
US
I have a customer that has a custom program built using Foxpro 2.5a. The program runs fine if the system's date is set before 1/1/2000, but it will not run at all with the correct date set. Microsoft has no information on this version. They only tested version 2.6 and above. The customer wants to switch to something else, but needs the program to work until they do. Does anyone know how to get the program to run?
 
Do You Have Access To The Source Code?<br>
If No<br>
Game Is Over. Ignore the rest of this message<br>
endif<br>
<br>
Is Set Century On?<br>
if not add it.<br>
<br>
If the Customer wants to go to another program, Is VFP one of the programs. VFP6 will run all 2.5 code with the exception of report forms. <br>
<br>
To convert the 2.5 tables to to VFP6, Start VFP6 and <br>
Set Century on <br>
Set Exclusive on<br>
Open each table exclusive, <br>
Assign the code page,<br>
replace all (table.datefield) with (table.datefield) <br>
then reindex the table<br>
<br>
If there are a lot of tables, I have a program that you can run that collects the index information and places it into a table. From there I have a program that will index the databases with all new indexes from the index table. <br>
I also have a program that collects all the fields for all the tables in a directory and makes a data-dictonary out of it. From there you can find all the date fields. <br>
<br>
To convert the report forms, just open them up with VFP6 and let the convert program go from there. P.S. you have to convert the tables first. Hint, Run all the reports from the program after you convert them. VFP6 data enrivoments work differently then 2.5 . If after the report runs and the program crashs with closed table warnings, Reopen the report form and remove the tables from the Data Enviroment listing. As a rule I clear the Data Enviroment on all converted reports.<br>
<br>
The menus will work but will act a little different, You will also have to convert them. Again, just open them in VFP6 and the converter will do all the work.<br>
<br>
Create a new project in VFP6 add the main program and VFP6 will create a new application Windows can run. <br>
<br>
If you want the programs I mentioned Just E-Mail me.<br>
Good Luck with the convert.<br>
<p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Thanks for the response. I am going to the customer soon so I will let you know if they have the source code. I don't think they do.
 
Even if you don't have the source code, you should be able to create (or edit) the CONFIG.FPW file (or CONFIG.FP if it's DOS) to add CENTURY=ON. -Shawn
 
I think you should have access to the source code, because sometime even you have set century on, but in the source code may be there some procedure are just use 8 charaters for say or get syntac.<br>
e.g.<br>
idate={}<br>
@ 1,2 get idate pict ' / / '<br>
read<br>
in this case, set century on isn't usefull. Because when the user fill the idate with 1/1/00, in dos that will give value 1/1/1900 not 1/1/2000<br>
<p>TONNI<br><a href=mailto:uatnehc@bdg.centrin.net.id>uatnehc@bdg.centrin.net.id</a><br><a href= Forum</a><br>
 
Your Right Tonni,<br>
I forgot about the date format. I never use it because the set century command always formated a date field automatically. All my library functions I use to call a say/get to a date field depend on the set century on command. -&gt;If&lt;- the programmer put a format of the date string you will need the source code to fix it. Since the computer always validated a date field I could never see the sense in the date format string.<br>
<br>
I ran into a programmer that put format statements on Logicals. I can understand the Y/N format on a logical but a T/F ???<br>
<br>
<p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
You won't <i>necessarilly</i> need to convert the screens to VFP6 - VFP can run the FP25-generated PRGs directly, but the formatting may be obscene.
 
skelly, thanks for the tip about the CONFIG.FP file. Since the customer has told me that the program won't even load if the date is set past 12/31/1999 I am hoping that will at least get it working. <br><br>As for the date formatting, I will probably bring the PRGs into VFP and reformat if I can.<br><br>I am going to see the customer tomorrow, so I will check back after then.
 
I got to look at the program. Here are more details.<br><br>Most of the source code is there. All except one module that is compiled. It sets up the environment and several standard routines used throughout the rest of the modules, including error handling. It looks like it may be a set of routines that the original programmer wanted to keep secret. <br><br>The DBF files have date fields that use both date and character types. I tried changing the character fields to 10 characters. No help.<br><br>The program loads properly, but I cannot get past the initial screen. I have tried skipping some of the code in the initial program, but it seems that the routines in the compiled module do lots of setup stuff. I have also tried stepping through the program, but I haven't been able to nail down where the program is stopping.<br><br>I have tried adding SET CENTURY ON in the first PRG file, but that did not help. I did try creating a CONFIG.FP file, but I used SET CENTURY ON in it. I will try changing it to CENTURY=ON instead.<br><br>I now have a copy of the program and I will be poking at it some more. I could use some suggestions on better ways of tracing program execution. <br><br>The customer has said that they would like to avoid trying to bring the code into VFP. They have already paid another company to duplicate this one's functions and convert the data as well. The new program was supposed to have been ready before Christmas, but they ran into problems. Right now the customer just wants to be able to use what they have until the new program is ready. The original programmer's name is Doug Hersh and the program is used from Legal Subrogation. I am trying to see if I can locate him for suggestions.
 
Here are some more suggestions.<br>1.&nbsp;&nbsp;Make sure you place the set century command AFTER the enviroment setup routine.&nbsp;&nbsp;(The programmer mave have set century off in that routine.<br><br>2.&nbsp;&nbsp;Run the program on a computer with a Y2K certified BIOS chip.&nbsp;&nbsp;The computer the customer is running it on may be a old machine.<br><br>3.&nbsp;&nbsp;Look into a program called ReFox (<A HREF=" TARGET="_new"> converts 2.x fxp/app code back into fox code.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
I believe that there is a function called YEAR().&nbsp;&nbsp;This should convert your 2 digit years to 4 digit years, and I have seen this extensively used with Fox for Dos Y2K issues.
 
Well, it looks like my work has been put on hold. The customer is getting a new program that replaces this one and wants to try it before trying to fix this one. <br><br>Thanks for all of the help. <br><br>I have suggested they try Y2KFox or Refox if they need it in the future. I will see what happens.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top