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

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







PRODUCT : Paradox NUMBER : 682
VERSION : 2.0 & up
OS : DOS
DATE : September 11, 1991 PAGE : 1/3

TITLE : CONVERTING TEXT FIELDS TO INITIAL CAPS




Here is a script which will change words with all upper case
letters to a capitalized word (first letter capitalized only).
For instance your data currently reads "ED SMITH" but you want it
to read "Ed Smith". To accomplish this perform the following
actions:

From your main menu select {Scripts}/{Editor}/{Create} and
type the word CAPS and press . On the screen which
follows, type the following code:

;==============================================================
EDIT "Table_Name"

MOVETO [Field_Name]

SCAN
[]=FORMAT("CC", LOWER([]))
ENDSCAN

MESSAGE
"Press [F2] to save. Any other key to CANCEL changes."

x = GETCHAR()

IF x = -60 THEN ; -60 equals "F2"
DO_IT!
ELSE
CANCELEDIT
ENDIF
;==============================================================
Then select and {DO_IT!}

To play the script, select {Scripts}/{Play}, type CAPS and
press . An explanation of the above script follows, so
you can understand it and learn to modify it to better suit your
exact needs.




















PRODUCT : Paradox NUMBER : 682
VERSION : 2.0 & up
OS : DOS
DATE : September 11, 1991 PAGE : 2/3

TITLE : CONVERTING TEXT FIELDS TO INITIAL CAPS




Comments:______________________________________________

EDIT "Table_Name" Selects the table in Edit Mode. Replace the
word Table_Name with the actual name of your
table. Do not forget to type in the
quotation marks.

MOVETO [Field_Name] Selects the field. Replace the word
Field_Name with the name of the field which
contains the data to be changed. Do not
forget the square brackets.

SCAN Tell Paradox to step through the table record
by record and perform the following
functions.

[]=FORMAT("CC",LOWER([])) The LOWER function inside the
FORMAT
function will change each word in the current
field to lower-case. The "CC" part of the
FORMAT function then changes the first letter
in each word in the field to upper case.

ENDSCAN Ends the SCAN loop.

MESSAGE The MESSAGE command places a message on
the screen for the user to respond to.

X=GETCHAR() This accepts one character from the
keyboard. The program will wait here
until a key is pressed. See also the
related WAIT command in the PAL Guide.

IF X=-60 THEN DO_IT!If the key is pressed, the changes to
the table will be saved.

ELSE CANCELEDIT If ANYTHING else is pressed, the edit will be
canceled and the changes lost.

ENDIF This closes the IF statement.
















PRODUCT : Paradox NUMBER : 682
VERSION : 2.0 & up
OS : DOS
DATE : September 11, 1991 PAGE : 3/3

TITLE : CONVERTING TEXT FIELDS TO INITIAL CAPS




Final Remarks:

Everything in the script after the ENDSCAN statement can be left
out if the user chooses. However if this is done, the user must
remember to either press or {DO_IT!} after playing the
script, or enter the line:

DO_IT!

after the ENDSCAN statement to save the changes the script has
made to the table. If you do not wish to save the changes after
seeing them (if you have removed the lines after ENDSCAN), then
you must select {Cancel}/{Yes}.






































  3 Responses to “Category : Paradox DBMS
Archive   : TECH91.ZIP
Filename : TI682.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/