Category : Paradox DBMS
Archive   : TECH91.ZIP
Filename : TI788.ASC

 
Output of file : TI788.ASC contained in archive : TECH91.ZIP







PRODUCT : Paradox NUMBER : 788
VERSION : 3.5
OS : DOS
DATE : September 11, 1991 PAGE : 1/2

TITLE : Converting Numeric Data from Earlier Paradox Versions




One of the major improvements of Paradox 3.5 over earlier
versions of Paradox is the use of the Turbo C math library. This
library provides greater precision and compatibility across other
products than the one used in earlier versions of Paradox.
However, this will cause some numeric and dollar values that were
entered using an earlier version of Paradox to be stored
differently in Paradox 3.5.

Some symptoms of a number being stored or rounded differently are
LOCATE and ZOOM commands returning the message "No Match Found".
Other symptoms are Find or multi-table queries that link on a
numeric field that do not produce expected results. Data entered
via keyboard into Paradox 3.5 should not exhibit these symptoms
(Because of the way computers store numbers, there will always be
occasional roundoff errors when manipulating numbers with many
decimal digits of precision. Unfortunately, other methods of
representing numbers also have disadvantages.)

You can round your numeric data in a uniform manner with one or
both of the following methods. Both involve the translation of
the existing data to an alphanumeric value and the retranslation
back into a Paradox Numeric field.

The first method is to export the existing Paradox file to an
ASCII file, then import the data back into Paradox 3.5. This
method is appropriate if there are many tables or a table with
many fields to correct. (See Paradox 3.5 Readme File for
complete instructions.)

The second method is to run a short PAL script to correct the
numeric values in the table. This method is more appropriate if
there are few tables with few fields to correct. Use the script
editor to write the PAL script for the second method.

From the Paradox Main menu choose {Scripts} {Editor} {Write} and
provide a new script name. This script will correct Numeric
field values through the use of the NUMVAL and STRVAL functions.
Combined they perform similar steps as a complete export to ASCII
and import from ASCII. In the script Replace TableName with the
name of the table and replace FieldName with the name of the
field to be corrected. The Field to be corrected MUST be a
Numeric field.














PRODUCT : Paradox NUMBER : 788
VERSION : 3.5
OS : DOS
DATE : September 11, 1991 PAGE : 2/2

TITLE : Converting Numeric Data from Earlier Paradox Versions




; Script Begins
COEDIT "TableName"
SCAN
IF NOT ISBLANK([FieldName])
THEN [FieldName] = NUMVAL(STRVAL([FieldName]))
ENDIF
ENDSCAN
DO_IT!
; Script Ends

It is possible to convert more than one field at a time. Simply
insert additional lines inside the SCAN and ENDSCAN commands for
each field that need conversion. So a script that converted two
fields would have lines that look like this (where both fields
MUST be Numeric):

; Script Begins
IF NOT ISBLANK([FieldName]) THEN
[FieldName] = NUMVAL(STRVAL([FieldName]))
ENDIF
IF NOT ISBLANK([FieldName 2]) THEN
[FieldName 2] = NUMVAL(STRVAL([FieldName 2]))
ENDIF
; Script Ends

Press to save this script. To run the script choose
{Scripts} {Play} from the main menu and select your script.

After performing either of these two methods, the values in will
appear on screen to be unchanged, yet a ZOOM, LOCATE, FIND query,
or linking query operation will now produce the desired results.




















  3 Responses to “Category : Paradox DBMS
Archive   : TECH91.ZIP
Filename : TI788.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/