                    WELCOME TO dBASE IV 1.5
                    -----------------------

This file contains important information that is not contained in the
documentation for dBASE IV 1.5. All information in this file supersedes
information in the dBASE IV 1.5 documentation.

TABLE OF CONTENTS
-----------------

  1. Notes on Queries
  2. Notes on DBHEAP
  3. Creating User-defined Help
  4. Creating Pop-ups for Data Validation
  5. Guidelines for Interrupts
  6. Changes to the REPLACE FROM ARRAY Command
  7. Automatic Disk Compression Programs
  8. REPLACE ON <keyfield> in a Network Environment
  9. Reinstalling Printer Drivers
 10. Installing dBASE IV RunTime on a Network
 11. Installation Notes for Network Access Pack Users
 12. Using dBTUTOR on a Network
 13. Notes for Banyan Vines Version 4.10 Users
 14. Specific Documentation Corrections
 15. Guidelines for Using the Design and Data Surface Programs
 16. Notes on DBSETUP


1. NOTES ON QUERIES
   ----------------

Using IQ! to Optimize Queries:

IQ! is Borland's exclusive automatic Index Query optimization technology
embedded within QBE. To use IQ!:

1) Make sure you have a database open, and then select the Queries Design
   tool from the Control Center.

2) Select the Fields menu.

3) The Filter Method option on the Fields menu offers 4 choices: OPTIMIZED,
   SET KEY, INDEX...FOR, and SET FILTER. Select OPTIMIZED by pressing the
   Spacebar or Enter key.

4) Press the Esc key to return to the Queries Design tool.

OPTIMIZED automatically selects the fastest method for processing your
query among the three filter methods (SET KEY, INDEX...FOR, or SET FILTER).


Linking and Sorting Operations:

QBE linking and sorting operations on calculated fields involving more
than one database file are not supported.

If you use a complex calculated field involving more than one database
file in QBE and try to link or sort on this field, you'll get the
following error message:

  "Operation not allowed for calculated fields"


Creating Links with the Mouse:

On the Queries Design screen, you can create links by pointing with
the mouse. The mouse cursor alone does not create links, but you can
use the mouse to position the keyboard cursor.

Click on the F3/F4, Shift-Tab, and Tab keystroke identifiers (also known
as "hotkeys") on the navigation line to move the keyboard cursor into the
field you want to link.

When you've positioned the keyboard cursor into the linking field, click
on the Enter hotkey.


2. NOTES ON DBHEAP
   ---------------

The following information corrects the DBHEAP section on page 2-12 of the
Getting Started manual:

DBHEAP is a DOS environment variable that you set at the DOS prompt
before you start dBASE IV. DBHEAP tells dBASE how much of the RAM
available after loading dBASE should be reserved for memory-intensive
operations. The syntax is:

  SET DBHEAP=<expN>

where <expN> is any value from 1 to 100. The default is 50 (if you set
it to 0, it will default to 50). This number represents a percentage of
available space (a value of 30 means that dBASE will use only 30% of the
available RAM for memory-intensive operations, and will allocate the
remaining 70% for code overlays).

Memory-intensive operations include indexing, sorting, and using memory
files (such as windows, arrays, menus, memory variables, and so on).

The amount of memory available after dBASE is loaded really depends on
your particular hardware configuration and the application you're running.
The best way to fine-tune DBHEAP is to run an application using the
default setting (50), then run it again with higher and lower DBHEAP
settings to see if the application runs faster.

Suggested low/high settings to start with are 30 and 70 (the useful range
is between 20 and 80).


3. CREATING USER-DEFINED HELP
   --------------------------

The Form.gen template file lets you create user-defined Help frames.

The F1 Help key can now provide user-defined help information
for individual fields on the Edit screen. When you press F1 Help,
the information in the memo fields of a special database file
will display in a pop-up Help window. If you want to create your own
Help file, create the special database file described below.

The name of the database file must begin with the first six
characters of the name of the format file, followed by "_h.dbf".
For example, if the format file is called Entry.fmt, then the
Help file must be called Entry_h.dbf. The database file must
be created with the following structure, before you compile the
form:

        Field  Field Name  Type       Width  Dec  Tag
        -----  ----------  ---------  -----  ---- ---
            1  FLD_NAME    Character    10         Y
            2  FLD_HEADNG  Character    25         N
            3  FLD_HELP    Memo         10         N
       ----------------------------------------------

Enter the names of the fields for which you want help in the Fld_name
field. You need to create an index tag named Fld_name, as follows:

  INDEX ON UPPER( Fld_Name ) TAG Fld_Name

You do not need to include all the fields from the database in
the Help file, only the ones for which you want Help windows.

Enter the character string for the top frame of the Help window in the
Fld_headng field.

Enter the Help text you want displayed for each field in the Fld_help
memo field. If there is more text than will fit inside the help window,
navigation instructions are displayed inside the Help window.


4. CREATING POP-UPS FOR DATA VALIDATION
   ------------------------------------

Using CREATE/MODIFY SCREEN, you can create a data validation
routine that presents a pop-up displaying the valid choices from
a lookup database file when a user enters a value that does
not match the lookup file.

To create a pop-up for data validation, start from the "Accept value when"
portion of a field's Edit Options table on the forms design screen. You
must enter the following syntax (including quotes):

  "POPUP"="<database>-><fieldname> ORDER <fieldname> [REQ] [SHADOW]"

For example, to validate the Vendor_id field in Goods.dbf against the
Vendor_id field in Vendors.dbf, insert the following pop-up string in
the "Accept value when" fill-in when highlighting the Vendor_id field
in a form that uses Goods.dbf.

  "POPUP" = "Vendors->Vendor_id ORDER Vendor_id REQ SHADOW"

If you want to attach an additional .AND. condition to the pop-up
validation, include the condition after the "POPUP"="..." expression.
The condition should not be delimited with quotes.

The components of this pop-up string are:

POPUP               Initiates pop-up processing for this
                    field during EDIT.

Vendors->Vendor_id  Indicates the database file to open and
                    the field in that database file to use
                    for data validation. You must have an index
                    tag on this field.

ORDER Vendor_id     Specifies the index tag that orders this field.

REQ                 Shows that the user must enter something
                    into the field before moving on. This is
                    optional. If REQ is omitted, the user can
                    escape the pop-up and leave the field blank.

SHADOW              Provides a shadowing effect underneath the
                    pop-ups. SHADOW is optional.

You can use a field from the .DBF file you are currently working
with or a .DBF from another work area. However, the validated file
and the lookup must be different files. Pop-ups are usually displayed
below the currently-highlighted field, unless the current field is
low on the form.

Limitations of Pop-up Validation:

- This feature is designed for EDIT and might not display as smoothly
  in BROWSE. If you have a pop-up on your EDIT, the F2 toggle from EDIT
  to BROWSE is disabled.

- Pop-up validation cannot be used on a multiple choice field.

- Pop-up validation cannot be used on a form created by using a view that
  contains more than one file.

- In order to protect a procedure file you currently have in use, EDIT
  will close it on entry and reopen it on exit. If this presents a
  problem with forms that use procedures, see SET LIBRARY in the Language
  Reference manual, and Sysproc and SET LIBRARY in the Programming in
  dBASE IV manual.

- The first six characters of the form name and the first eight characters
  of the field names with these pop-ups must be unique.


5. GUIDELINES FOR INTERRUPTS
   -------------------------

You can write or use dBASE applications in which commands or full screen
operations are interrupted with another command or function. Please
carefully review the extensive discussion of interrupt handling in the
FUNCTION command section of the Language Reference before attempting to
program any interrupt handlers of your own. Additional guidelines follow
for specific situations.


Restoring the Record Pointer:


An important situation that is not discussed in the Language Reference
manual occurs when an interrupting command or function moves the record
pointer of the original database file. Each open database file has an
associated work area in which one of the data items, the record pointer,
tells dBASE IV which record is the active record.

When executing an interrupt routine, dBASE does not automatically save
and restore the various work areas' current record pointers, regardless
of the DBTRAP setting. In every work area, whichever record is active at
the end of an interrupt remains the active record.

To ensure that an interrupted process (such as BROWSE) resumes smoothly
after an interruption, all record pointers for the originally-active
database files must be returned to the values they had just prior to
interruption. Because dBASE IV does not do this automatically, your
interrupt functions or procedures should take explicit steps to ensure
that all record pointers are restored to their original values.

You can determine the value of the record pointer for each work area with
the RECNO() function.

Following is a typical example of how to move the record pointer in dBASE
IV (with the GO command), and how to ensure that the interrupted process
resumes smoothly:

    FUNCTION myudf(...)
    oldrecno = RECNO()
    [the rest of your interrupting code here]
    GO oldrecno
    RETURN


Replacing APPEND Values:


If you write code or use an application that moves the record pointer
during an interruption, (see the item above), you must take special care
when you're executing the interrupt during the full-screen APPEND command.

Whenever you interrupt APPEND, you should restore the record pointer as
mentioned in the previous item. In addition, your interrupting code must
save (on entry) any values entered onto the APPEND screen prior to the
interruption. You must then restore these saved values after the record
pointer is repositioned (just before the interrupt routine exits).

These steps are required because dBASE IV keeps all values entered during
the APPEND command in a temporary buffer. During APPEND, the buffer record
values are handled as follows:

- If you press Esc and abandon the new record, the values are discarded.

- If you accept the new record during a normal APPEND, the values are
  added to the database file as a permanent record. However, when the
  record pointer is moved during an APPEND interrupt, the values in the
  temporary record are not retained (they become blank). Although the
  APPEND screen may show the values as they were originally entered,
  those values are no longer in the temporary buffer.

A common occurrence of this is during an interrupt call to a
validation UDF which uses a SEEK to check for duplicate keys. SEEK
will reposition the database, changing the current record pointer and
blanking the temporary buffer.

The following example illustrates the proper steps for your APPEND
interrupt code. These steps ensure that the values entered before an
interrupt are preserved after the interrupt. Note that this example
saves previously-entered memo fields.

1) Save the current record number.

    oldrecno = RECNO()

2) Save any values already entered.

    numfield = FLDCOUNT()
    DECLARE Fldinfo[numfield,2]
    n = 1
    DO WHILE n <= numfield
     IF Field(n) # "_DBASELOCK"       && Don't save _DBASELOCK
        Fldinfo[n,1] = FIELD(n)
        IF TYPE( Field(n) ) = "M"     && Save memo text to file
           SET SAFETY OFF
           COPY MEMO &Fldinfo[n,1] TO LEFT(Fldinfo[n,1],8)+".xxx"
           SET SAFETY ON
        ELSE
           Fldinfo[n,2] = &Fldinfo[n,1]
        ENDIF
     ENDIF
     n = n+1
    ENDDO

3) Perform the rest of the interrupting code.

     [Whatever you want it to do]

4) Return to the original record number.

     GO oldrecno

5) Restore the previously-entered field values.

    n = 1
    DO WHILE n <= numfield
     IF Field(n) # "_DBASELOCK"
        IF TYPE( Field(n) ) # "M"     && Restore memo text later
           REPLACE &Fldinfo[n,1] WITH Fldinfo[n,2]
        ENDIF
     ENDIF
     n = n+1
    ENDDO

Memo fields cannot be restored using the REPLACE command during an
APPEND interrupt. You can restore the memo field data from the files
written to disk with the code shown above. These files have names
created from the field names such as LEFT(Fldinfo[n,1],8)+".xxx".

If your interrupting code deliberately changes the initial field values
entered into APPEND, you will need to modify the sample code shown here
so that it fills those fields with their final values, not the initial
values the fields had before the interrupt.


Using Fields Lists:


dBASE IV lets you restrict the fields on which some dBASE IV commands
operate. (See the SET FIELDS command in the Language Reference manual for
a list of commands affected by the fields list.) You can use a fields list
in two ways:

1) You can provide a temporary fields list when executing a command:

     BROWSE FIELDS Lastname, Firstname, City

A temporary fields list cannot reference any fields outside the global
fields list (if SET FIELDS is ON), and it does not affect the global
fields list.

2) You can set up a global fields list with the SET FIELDS command:

     SET FIELDS TO Lastname, Firstname, City

Once you have established the global fields list, you can change it in
two ways:

1) By executing the SET FIELDS or CLEAR FIELDS commands.

2) By closing a database file containing fields in the fields list.

dBASE executes these commands at any time, without any restrictions,
including executing them within an interrupt routine. However,
changing the fields list within an interrupt routine can prevent
the interrupted command from finishing correctly.

If your interrupt routine interrupts a command that uses a fields list, do
not use these actions (SET FIELDS, CLEAR FIELDS, or closing a database
file containing fields in the fields list) to change or discard the global
fields list during the interruption.


6. CHANGES TO THE REPLACE FROM ARRAY COMMAND
   -----------------------------------------

In dBASE IV 1.1, a one-dimensional array replaced the records within
the scope that met the condition. However, REPLACE FROM ARRAY...ALL
replaced only one database record.

In dBASE IV 1.5, a one-dimensional array will replace the first record in
the database file that meets the scope condition. To replace more than
one record in the database file with the elements of a one-dimensional
array, you can use a DO WHILE structure.

For example:

*--- Using the CONTACTS database, assign a new area code to the
*--- city of 'TORRANCE', and a new sales rep 'Samuel Smith'.

     DECLARE New_Code[2]

     New_Code[1] = '310'                     && New area code
     New_Code[2] = 'Samuel Smith'            && New sales rep

     USE Contacts

     DO WHILE .NOT. EOF()
          IF Area_Code = '213' .AND. City = 'TORRANCE'
            REPLACE FROM ARRAY New_Code FIELDS Area_Code, Sales_Rep
          ENDIF
          SKIP
     ENDDO

For further information on using REPLACE FROM ARRAY, please see the
dBASE IV 1.5 Language Reference manual.


7. AUTOMATIC DISK COMPRESSION PROGRAMS
   ------------------------------------

To improve performance on PCs with extra memory, dBASE IV 1.5 supports the
optional use of the HyperDisk disk caching program, which is provided as a
standard dBASE software component. Recent testing has shown that the
HyperDisk cache program and various automatic disk compression programs,
such as Stacker and SuperStor, conflict in their management of low-level
disk I/O, leading to a fundamental incompatibility.

If the dBASE HyperDisk cache is active when dBASE is used to access data
on a compressed logical drive managed by Stacker or SuperStor, the
compressed logical drive will most probably become corrupt and unusable.

If you are already using Stacker or SuperStor or any other automatic
compression program, disable the dBASE HyperDisk cache program. To do
this during dBASE installation, select the option of not using the
cache. If dBASE is already installed and you want to begin using an
automatic compression program, disable the dBASE cache first. To do
this, go to the drive and directory in which dBASE is installed and
enter the command:

  CACHEDB OFF

This will deactivate the dBASE HyperDisk cache and eliminate the conflict.


8. REPLACE ON <keyfield> IN A NETWORK ENVIRONMENT
   ----------------------------------------------

Replacements on key fields of an indexed database file also update the
index file if it's in use. When the replacement is made, the record moves
to a new position in the index file if the index is active. If you specify
a scope, a FOR, or a WHILE when making replacements on an indexed field,
(and the index is active) all the records you intended may not be replaced.
For example, if you REPLACE ALL, only the first record and those that
follow the new key field value will be replaced. To replace all the
records, you should either put the database in natural order by entering
SET ORDER TO or use the database exclusively with USE <database name>
EXCLUSIVE.


9. REINSTALLING PRINTER DRIVERS
   ----------------------------

Some printer driver names, such as Ibmpro.pr2, have been changed in dBASE
IV version 1.5. If you are using IBMPRO printers, reinstall the printer
drivers using DBSETUP.

If you run dBASE IV 1.5 with your old Config.db file, you might get an
error message like "File not found" indicating that the printer driver
could not be found. If you get this message, use DBSETUP to reinstall
the new versions of your printer drivers.


10. INSTALLING dBASE IV RUNTIME ON A NETWORK
    -----------------------------------------

dBASE IV RunTime is a separate package that lets you distribute
compiled and (optionally) linked object code files as a stand-alone
application. If you own the RunTime package and install it on a network,
be sure to mark the following files read-only (use the DOS ATTRIB
command):

  Runtime.res
  Runtime.ovl


11. INSTALLATION NOTES FOR NETWORK ACCESS PACK USERS
    ------------------------------------------------

If you install single-user dBASE and later purchase the Network Access
Pack to support additional users, make the following changes after
running ADDUSER4:

1) Delete the EXCLUSIVE = ON statement from your Config.db file

2) Mark the following files read-only (use the DOS ATTRIB command):

   dBase1.res
   dBase2.res
   dBase3.res
   dBase.ovl

You should also mark these files read-only after running dBaseovl.bat
on a network.


12. USING dBTUTOR ON A NETWORK
    --------------------------

You can run dBTUTOR on a network only if you disable your network's
message protocol. Otherwise, your computer will hang if a message
notice interrupts the dBTUTOR program.


13. NOTES FOR BANYAN VINES VERSION 4.10 USERS
    -----------------------------------------

Unless you enable NetBIOS extensions, Banyan Vines version 4.10 will
return a null value for dBASE's ID(), LKSYS(2), and LKSYS(5) functions,
and for the DISPLAY USER command. In addition, dBASE users attempting to
BEGIN TRANSACTION will receive error message #183, "Unterminated
transaction file exists, unable to start transaction." If you enable
NetBIOS extensions (a TSR), Banyan will return a NetBIOS User ID that
dBASE can use.

To enable NetBIOS extensions, add the following to the Autoexec.bat on
the workstation:

  SETNETB /Name:<nodename>

where <nodename> is the name you want dBASE IV to use. This name can
be your Banyan login name. To avoid conflicts in dBASE IV, verify that
the nodename is unique for all dBASE users. If you have problems enabling
NetBIOS extensions, contact your Banyan Network Administrator.


14. SPECIFIC DOCUMENTATION CORRECTIONS
    ----------------------------------

Following are corrections to the Language Reference manual.


Page 2-133, IMPORT

IMPORTing a PFS file will also create a .vue file.


Page 2-144, KEYBOARD

Table 2-9, Supported Key Labels, should include the following note:

You cannot use {Enter} or {Esc} with the KEYBOARD command. To send an
Enter key, use either {Ctrl-M} or {13}. To send an Esc key, use {27}.
You can continue to use the CHR() function with these values.


Page 2-189, QUIT

The <expN> value can be an integer between -(2^31)+1 to (2^31)-1. dBASE
will return to DOS a value based on the value of MOD({return}, 256)
to yield a number in the range of 0 to 255.


Page 2-228, TOTAL

The first paragraph on this page states "The structure of the TO file
is the same as the active database file as limited by FIELDS, except
that memo fields are not copied to the new file." Actually, the
FIELDS option limits only the fields that are actually totaled. To
limit the fields in the TO file, use the SET FIELDS TO command.


Page 3-46, SET FILTER TO

Using the optional [FILE <filename>/?] parameter and the [<condition>]
parameter are mutually exclusive. Correct the syntax as follows:

    SET FILTER TO [ FILE <filename>/? ] / [ <condition> ]


Page 3-50, SET FUNCTION

The range of values accepted for the numeric key assignment, <expN>, is
omitted. The range is between 2 and 29.


Page 3-58, SET KEY

Correct the syntax as follows:

    SET KEY TO [ <exp:match> / RANGE <exp:range> ]
                    [ IN <expWA> ]

    where <exp:range> ::= <exp:low> , <exp:high>
                          <exp:low> [ , ]
                          , <exp:high>

The syntax and the values shown for the range in the SET KEY example on
page 3-59 are wrong. Correct the example as follows:

    . USE People
    . INDEX ON Zip TAG Zip
    . SET KEY TO RANGE '60000' , '90000'
    . BROWSE


Page 3-60, SET LIBRARY TO

The <filename> parameter is optional. SET LIBRARY TO with no
filename will close the active LIBRARY file. Correct the syntax as
follows:

    SET LIBRARY TO [ <filename> ]


Page 3-73, SET PRINTER TO

The <DOS device> parameter is optional. If the device name is missing,
SET PRINTER TO will reset the printer to the default DOS printer
device. Correct the syntax as follows:

    SET PRINTER TO [ <DOS device> ]


Page 3-98, SET WINDOW

The <window name> parameter is optional. If you do not include a window
name, the window for the memo field is reset to none. Correct the syntax
as follows:

    SET WINDOW OF MEMO TO [ <window name> ]


Page 4-12, CALL()

Correct the syntax as follows:

    CALL( <expC>, <expression> [, <expression list>] )


Page 4-141, TAGNO()

Correct the syntax as follows:

    TAGNO( [ <order name> [, <mdx name> [, <alias> ]]])


15. GUIDELINES FOR USING THE DESIGN AND DATA SURFACE PROGRAMS
    ---------------------------------------------------------

In order to maintain the integrity of the Control Center and the user's
design surface session, your surface program should keep track of the
following settings and restore them upon completion:

1) Catalogs

The foundation of the Control Center is the catalog file. When returning
from a surface program, ensure that you return control to the original
catalog file.

Commands like CLEAR ALL, CLOSE ALL, and SET CATALOG TO will close the
active catalog file. If you use these commands, you must reset the
catalog file before ending the surface program.

Use the CATALOG() function to save the current catalog, then restore it
when ending the surface program.

2) Database files

Commands like USE, CLOSE DATABASES, CLOSE ALL, and CLEAR ALL will close
an open database file. If you use these commands in your surface program,
you must reopen any database files that were in use before the surface
program was launched.

Use the DBF() function to save the name of any database files in use, then
restore them when ending the surface program.

Note:  If DBTRAP is ON, and a database file was at the
       beginning of the surface program, CLOSE ALL, CLOSE
       DATABASES, and CLEAR ALL will leave that one database
       file open.

3) Indexes

Certain design surfaces, such as the queries design screen, rely on
indexes associated with the user's database files.

If your surface program deletes an index that was associated with a
database file in use when your surface program was launched, then you
must recreate the index before returning to the design surface.

Use the MDX(), NDX(), and KEY() functions to save the name and key
expressions of any indexes, and then recreate them when ending the
surface program.

4) Work area

In your surface program, you can move to other work areas and open
and close files in these other work areas. Unless you are using a custom
Form, Report, or Label.gen, you must be sure to return to the original
work area before your field or layout program returns to the design
surface.

Use the SELECT() function to save the current work area, then reselect it
when ending your surface program.

5) The screen

Through the use of surface programs, you are given complete control of the
design and data screens. Your program can clear the screen and add any
output you want into it. When returning to the surface, dBASE does not
automatically repaint the screen for you.

If you want to maintain the user's screen, use the DEFINE WINDOW and
ACTIVATE WINDOW commands in the beginning of your surface program, do
any screen output, then issue a DEACTIVATE WINDOW command before returning
to the surface.

Another way to save the surface screen is to issue a SAVE SCREEN command
at the beginning of your surface program, then a RESTORE SCREEN command
at the end.


16. NOTES ON DBSETUP
    ----------------

If you alter or create your Config.db using DBSETUP, do not enter commas
into any of the following Files menu options:

    Prgapplic
    Prgbrowse
    Prgcc
    Prgdata
    Prgedit
    Prgform
    Prglabel
    Prgquery
    Prgreport
