

                   README file for DBFVIEW version 2.33


CONTENTS:
---------
  1. Introduction (what is it, why is it)
  2. Warnings (in fact: known bugs)
  3. History (what happened since V2.0, and what will happen)
  4. Keys and mouse usage
  5. Details and hints about some functions (Edit, Pack, etc.)

(if you have the Readme.txt of version 2.3, the only new thing is
in the corrected bugs list, in the History part).


1. INTRODUCTION:
----------------
Dbfview is an editor for dBase and FoxPro databases. It is similar
to Dbview from Norton Commander (since that was the model), but it has
a few improvements. In other words I've tried to write a program that
behaves like a corrected Dbview (from my point of view), and also can
edit the databases.

LICENSE: This package is FREEWARE, so you may copy it, and distribute the
entire package as long as you don't modify any of it's files.
The package means three files: FILE_ID.DIZ, README.TXT and DBFVIEW.EXE.

WARRANTY: Use this program at your own risk, so the author can not be
reclaimed for any physical or moral damage caused by the program.

You can put Dbfview to be the default viewer in Norton Commander or one of
it's clones. It is fast, short, etc. It is much easier to use this if you
want to search, modify or add data in databases than launching Fox, or
other complex program.

The program needs a 80286+ CPU. The minimum memory required depends on the
structure of the database, it is 70Kb+44*size of one record. The program
uses only the base memory of DOS (below 640Kb), and reads from the database
as much as it can. Also DOS 3.3+ is needed.

You have to pass the name of the database file as the command line parame-
ter. If extension is ommitted, ".DBF" is appended. You can use the DOS
conventions - wildcards are not allowed - when specifying the path to the
file.


2. WARNINGS:
------------
Dbfview saves and restores the content of the screen and the cursor size
and position. But it is supposed that on startup a 80x25 text mode is
active (both color and monochrome 80x25 mode is supported). This may lead
to a bug:
- if launched in a graphic mode, it is very possible that a part of the
  screen will be messed up, but nothing readable can be seen. Also it
  is very possible that the screen will not be restored correctly.
- if launched in a text mode with other than 80 columns, the program's
  display lines won't match the video lines, and the mouse coordinates
  will be confused. The screen and cursor will be restored correctly.
- if launched in a text mode with 80 columns (80x28/43/50) only the first
  25 lines will be saved, used and restored, without errors.

If Dbfview is launched while the text cursor is hidden, in text-editing
regions will appear a block cursor (typical case if you put Dbfview to be
launched as default viewer in NC 5.0). Otherwise the cursor will have the
form before the launch.

Dbfview handles (in theory of course) any database which respects
the limitations of FoxPro 2.6. As I know, in Clipper you can create
databases with more than 255 fields (in Fox you can't).

"THIS IS A FEATURE, NOT A BUG":
The program doesn't updates the date of the last modification in the
header of the database, when any changes are made. The DOS file date
is the new date, but some programs may check only the date in the
header. Watch out for the index files - reindex if it's necessary!!
(the feature: maybe sometimes it's better not to change that date ...)

Not supported:
- viewing/editing the contents of memo fields
- the use of any index files (records are always displayed in their
  physical order - but you can insert records anywhere). If you have an
  indexed database and you modify it with Dbfview, you should reindex it
  when you open it with an other program.


3. HISTORY:
-----------
Version 1.0 was finished in February 1997.
V1.1 in September 1997,
V2.0 in June 1998,
V2.2 in March 1999,
V2.3 in October 1999,
and V2.33 in January 2000.

The versions before 2.0 are basically the same, but nobody saw them
except me and my neighbour, so there's no need to mention them any more.
Version 2.2 was a major step, in fact since 2.2 Dbfview is no longer
just a viewer, but also an editor.
Version 2.3 came to existance because some bugs were discovered in 2.2.
This stands also for version 2.33, because two small bugs were reported.

Changes in version 2.33:
	- bug fix: the "Last modified" part in the Info window (F2)
	  showed year 200 instead of 2000. This does not affected the
	  database. This year is kept on one byte, and Fox (2.6) sets
	  the value to 0 in 2000. NOW (my) rule is: if this value is below
	  80, then it should mean 20xx, between 80 and 99 is 19xx.
	  Thanks to Mr. Pavel Novy for announcing me about this.
	- bug fix: if you opened an empty database and pressed Enter or
	  Pack, the area of records become gray or red - in linear mode,
	  until you added some record. Now the behaviour is normal.

Changes of version 2.3:
	- bug fix: endless loop if after a Pack operation all the
	  records were deleted
	- bug fix: the 'deleted' mark (in the first column) is ONLY "*".
	  So any other character doesn't mean anything, just exists that
	  way the file. But when a 'deleted' mark is removed, it is
	  replaced with a Space.
	- the records marked 'deleted' are displayed in red (in Lines
	  mode).
	- bug fix: a huge error was corrected: you could not edit nume-
	  ric fields if they had decimals. Thanks to Mr. Frantisek Secky
	  for attentioning me.
	- fixed that little problem, that even if there were no records,
	  the record pointer was 1.
	- now the program knows if the dbf has a structural index file
	  (but still doesn't use it). In the Info window (F2) it is
	  mentioned if the database has a CDX file.

Changes of version 2.2:
	- added mouse support (not very elegant, but it works)
	- naturally, more Help - for the mouse operations
	- fixed a bug that could happen on slow AT's (8MHz) when
	  viewing large databases
	- fixed the hidden cursor problem (no cursor at all under NC5.0)
	- in text-entry areas the default value is cleared if you
	  start typing a new text (like in the Pascal IDE).
	- on disk errors the option "Retry" is included
        - screensaver
	- new functions: Append, Insert, Edit, Pack.
	- change of the bottom line when Alt/Ctrl/Shift is pressed
	- startup screen visualisation (Alt-F5)

In future versions is planned:
	- develop the mouse behaviour
	- use of 80x50 and SVGA modes (132x50)

I don't think that the Windows version - announced in the Readme of
version 2.3 - shall be finished soon. At this time only shows the
records, and that's all. But I don't have time to do it now. Later.


4. KEYS AND MOUSE USAGE:
------------------------
Left-click on the buttons in the bottom line starts the choosed Fxx action,
right-click starts the Alt-Fxx action (if any). NOTE that this is independent
from the keyboard state (the same happens even if Shift/Ctrl/Alt was pressed).
F1: Help.
F2: Informations about the database and memory.
F3: Description of the fields.
F4: Switches between the two display modes.
F5: Jumps to a specified (by it's number) record.
Alt-F5: Shows the original screen (the one when Dbfview was launched).
F7: Searches for a text.
Shift-F7: Continues the search (if there was any search previously).
Alt-F7: Changes the search direction (forward/backward).
F8: Packs the database.
Insert: Appends a blank record to the database, and jumps to it.
F9: Inserts a specified number of blank records at the current position.
F10 or ESC: Ends the program.
Delete: Toggles the Delete mark of the current record, and moves to the
	next record.
Enter: Edits the current record.
Left/Right: Shifts the display to left/right by one character.
Ctrl-Left/Right: Shifts the display to left/right by one field.
Ctrl-Home/End: Shifts the display to the leftmost/rightmost column.
The other movement keys are self explanatory: Up, Down, PgUp, PgDn,
	Home(Ctrl-PgUp), End(Ctrl-PgDn).

Left-click on a record moves the selection there. Right-click edits the
record.
Left-click in the upper-left corner means Alt-F5.
If you move the mouse pointer to the upper-right corner, the screensaver is
started.
Left-click on the borders of the white rectangle acts like the movement keys
(Left, Right, Up, Down); right-click acts like PgUp, PgDn, ^Left, ^Right.


5. DETAILS AND HINTS:
---------------------
The file is opened before each read/write operation, and it is closed
right after it.

In the upper-right corner of the screen the two numbers are:
"number of the current record"/"total number of records".

On exit, an error code is returned, which you can test from a program or
batch file (with ERRORLEVEL, see the DOS documentation).
These codes are:
	0: normal exit, no error
	1: file open error
	2: file close error
	3: file seek error
	4: file read error
	5: not enough memory (to read the header and a minimum number of
	   records)
	6: the DBF header is unknown, or has illegal values
	7: there are no fields in the database
	8: file write error
	9: out of disk space (during pack/insert)
	10: file delete error (during pack/insert)
	11: file rename error (during pack/insert)

Description of the SCREEN:
--------------------------
The database can be viewed in two modes:
1. Lines mode (default):
  Every record is displayed on a line of the screen. In the first line are
  the field names. The first column of the screen (under d) shows if a
  record is marked deleted ("*" is the mark; any other character is inter-
  preted as no mark).
  This column is always displayed. The others can be shifted left/right
  character-by-character or field-by-field. On the left/right margins are
  displayed double arrow-heads if more shift in that direction can be done.
  The width of a column is equal to the length of that field. So if the
  field length is shorter than its name, the name is truncated.
  In case of Memo/General/Picture fields, the type of these fields is
  displayed, not the value (eg. "memo"); in lowercase if the value is
  blank, in uppercase is there is any value.
2. Column mode:
  A single record is displayed on the screen. Each field is written on a
  separate line, in the format "NAME: value". If the value does not fit on
  the line, a double arrow-head is displayed at the end of line, and the
  rest is wrapped to the next line. If the record does not fit on the
  screen, you can scroll up/down the lines to see the rest of the fields.
  For Memo/General/Picture fields it is displayed the type and after it
  the value in brackets.
Remember, that the first displayed column is not set to 0 if you change to
Lines mode and back. If a record is marked deleted, "<Deleted>" will be
displayed on the top line (after the file name).
When Search finds a match in a field, the display is moved so that in the
first column of the field to be the first displayed (if it's possible) in
Lines mode. In Column mode just the record will become the current.

In HELP:
--------
Use the Up/Down/PgUp/PgDn keys to scroll. Left-click on the arrow buttons
means Up/Down, right-click means PgUp/PgDn. Home/End also works.

The same applies to the "Field Informations" box.

Notes about SEARCH:
-------------------
The search direction is indicated by the arrow after "7Search" (on the
bottom line).

Notes about EDITING:
--------------------
The date you introduced is interpreted in the following way: YYYY/MM/DD.
- an empty date is the one that has no characters or contains only
  spaces and eventually two slashes.
- in a non-empty date the two slashes are needed (you can use dots
  instead of slashes, but they are converted).
- if the year has less than 4 digits, it is it is rounded :
	Y -> 200Y, YY -> 19YY, YYY -> 2YYY.
- if the month or the day has one digit, '0' is added before them.
Numbers are justified to right. If the number has decimals, the decimal
  point and unsignificant zeros are appended. Signs can be used (+ or -),
  if you start a number with the decimal point then "0." is assumed.
Logical fields contain one character, which is converted to uppercase.
- 'T' is displayed as 'True';
- 'F' and ' ' as 'False';
- if the character is none of these, it is displayed as it is.
Memo/Picture/General fields are not changed.

Notes about PACKING (F8):
-------------------------
To pack a database means to physically remove the logically deleted records.
How this happens: a new dbf is created, and all the records which aren't
marked are copied there. Finally, the old dbf is deleted, and the new one is
renamed to the old name.
So, there must be enough free disk space to do this: at least the length of
the old database.
Be careful: once packed, the deleted records can't be restored (only with
Undelete/Unerase/Recycle Bin... recovering the whole deleted dbf).

Notes about INSERTING (F9):
---------------------------
This action also needs more free disk space, since a new file is created,
and the old will be deleted (see notes about Packing).
If any error occurs, the old file is not deleted, eventually a temporary
file remains in the directory.


Questions, critics, error informations are welcome.
Contact me at: kovacst@econ.ubbcluj.ro
Kovacs Tibor (Piece of Soft), 1999.October.14

