Reserved Words DataEase

Introduction

Reserved Words are those which could cause a conflict with a DataEase internal command or function. Their use was always considered poor practice although in earlier versions of DataEase you would usually get away with it. DataEase 5 for DOS is increasingly sensitive and DataEase for Windows is particularly sensitive to the use of reserved words in table, form, field and relationship names. I recommend that when upgrading from 4.53 to 5 the opportunity to check for and eliminate reserved word usage is taken at that stage, or as soon as possible thereafter. This is particularly relevant if you intend to use DfW to create a windows front-end to your DfD database.
The following are all reserved words and should not be present in any Form, Table, Field, Relationship, QBE or DQL Report, or Import name. This list has been updated January 2000 to include those words which now appear in v5 DQL commands – these include things like “Filename” – as in “current disk filename”.

(

)

+

.

/

1

2

3

:

;

<

=

>

a

abs

acos

after

all

ampm

and

any

app

application

as

asin

assign

atan

atan2

backup

begin

between

blank

bottom

break

call

case

ceil

check

commit

computername

configuration

connect

control

copy

cos

cosh

count

cpi

create

current

custom

data

data-entry

database

date

day

db

define

delete

dename

depath

destination

directory

disconnect

disk

do

document

dql

else

end

enter

entry

error

exec

exit

exp

extended

fasttext

field

file

filename

firstc

firstlast

firstw

floor

footer

for

form

format

from

functions

futurevalue

global

group

grouping

groups

header

highest

highlight

hours

if

import

in

index

indices

input

install

installment

item

jointext

julian

lastc

lastfirst

lastw

left

length

level

like

list

location

locations

lock

log

log10

long:

lookup

lower

lowest

lpi

margin

masks

max

mean

menu

menus

message

messages

midc

midw

min

minutes

mod

modification

modify

month

name

named

not

number

object

objects

of

off

on

operating

order

others

output

page

pause

percent

periods

position

power

presentvalue

printer

printers

procedure

program

proper

qbe

query

random

rate

record

records

relationship

relationships

reorganize

reply

report

restore

reverse

right

rollback

run

screen

seconds

selection

sin

sinh

spellcurrency

spelldate

spellnumber

spellweekday

sql

sqlcode

sqlcount

sqlmsgtxt

sqrt

standard

starting

status

std.dev

std.err

style

styles

stylesheet

subform

sum

system

table

tan

tanh

temp

textpos

time

timeampm

to

top

totals

tran

transaction

transfer

unlock

upper

user

users

using

value

variable

variance

view

weekday

while

width

with

year

yearday

NOTA – some of these are likely to be more dangerous than others – “system” being one. One to very much avoid is the semi-colon character. If this appears in a form or DQL name, any DIN file which includes that form or procedure name won’t work properly as a semi-colon is used as the separator in DIN file syntax.

. Removendo Palavras Reservadas .

Renaming a field is simple enough and loading and re-saving forms and DQLs under a new name likewise. The trick is to identify all cross references to each affected item and adjust them. Third party tools such as “IncrEase” can generate cross reference reports which will make this a simple task. Thorough preparation for these exercises is vital! The headings below provide the steps needed.

. Form Names .

  • Load the form, press F8 then press F7, then press F2
  • Say Yes to the option to save under a new name and enter that new name
  • Accept the defaults for “Name and Location of Table for this form”
  • Say Yes to transferring the data
  • Delete the original INCLUDING ITS RELATIONSHIPS!
  • Adjust all DQL reports and Imports which refer to the old form name

. Field names

  • Press F10 on the field and edit the field name.
  • Adjust any derivation on this field which includes it’s name, same for any upper or lower limit, and (v5.00 onwards) any formula in the Required, Prevent or Colour properties which include this field name.
  • Adjust any derivation formulae on other fields which refer to this renamed field, either on the same form or on other forms where it is referenced through a relationship operator.
  • Adjust any relationship records where this is used as a match field
  • Adjust all DQL references to this field – you will also need to recreate it on the format or under an output command in relevant cases
  • Any imports where the matching is by Field Name will also require some work on the program which prepares the import source file.

This might very well arise if you decide to convert dates to extended dates – for example a date field called “Date” on the form “InvoiceHeader” is to be changed to an ext date format and renamed “DateOfInvoice”. In these situations it is vital the correct order is followed otherwise you will loose the data from this field.

  • Change the field type e.g. from Standard Date to Extended Date
  • Save the form
  • After it has reorganized, load it again and change the field name, following the steps above

N.B. – DO NOT CHANGE THE FIELD TYPE AND IT’S NAME IN THE SAME PASS – FAILURE TO OBSERVE THIS WILL RESULT IN LOSS OF DATA FROM THE RE-NAMED FIELD

. Manutenção Remota .

As you may have guessed by now, form changes involving a field which is re-named cannot be done using DIN files to simply replace the original with a revised version. When a DIN file is applied, DataEase creates the new form then transfers the data from the old one which is deleted when the data transfer is complete. Transfer is by matching field names. This means that where this is necessary, it will have to be done manually. The only saving grace here is that it is ONLY those particular changes that need to be done this way. Once done, you can apply a DIN to replace that form with a revised version if you wish since the field names will now match up.

Richard Laidler
DataEase Approved Consultant
Alt-F1 Consultancy
January 2000

Share