Upgrading to DataFlex 3.2: Difference between revisions
m
Added note about the DataFlex debugger
Hsymington (talk | contribs) m (→Compiler Errors: removed reference to DAC) |
Hsymington (talk | contribs) m (Added note about the DataFlex debugger) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated. | The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated. | ||
'''Note:''' One very good reason to upgrade is that if you are using DataFlex 3.2, you can use the '''[https://docs.google.com/document/d/1a7DOX7bULiEqAkNXmKA-T91n0RfLFzh8V-CjXwMW0x0/edit#heading=h.mxjauxfaio71 DataFlex Debugger]''' to run your programs in debug mode with features such as single stepping, variable inspection, call stack and record buffer inspection. Read the help and get the DataFlex Debugger download, from the [https://www.dataaccess.eu/resources/downloads/download-category/download-subcategory-842?dagapsg=64 DataFlex Debugger download page]. | |||
== Why Upgrade? == | == Why Upgrade? == | ||
Line 470: | Line 473: | ||
===Error 4098 "Bad Relationship"=== | ===Error 4098 "Bad Relationship"=== | ||
Error encountered by developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length. | |||
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the "relating from" field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field. | Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the "relating from" field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field. | ||
Line 548: | Line 551: | ||
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used. | DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used. | ||
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), | In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), there is an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance. | ||
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), | DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), additional support has been implemented for easily making your applications Y2K compliant. | ||
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes. | There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes. | ||
Line 586: | Line 589: | ||
'''DataFlex 3.2''' | '''DataFlex 3.2''' | ||
In DataFlex 3.2, | In DataFlex 3.2, there is a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30). | ||
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2: | To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2: | ||
Line 624: | Line 627: | ||
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not. | DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not. | ||
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application | For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. | ||
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other. | In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other. | ||
Line 712: | Line 715: | ||
#Make sure c:\df23 is in your PATH environment variable | #Make sure c:\df23 is in your PATH environment variable | ||
#Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.) | #Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.) | ||
== Appendix A: Directory Listing of a DataFlex 2.3b Development License == | == Appendix A: Directory Listing of a DataFlex 2.3b Development License == |