Dec 212017
 
Aston Tate dBase IV Tech Notes for Oct 89. Useful information.
File TN8910.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Aston Tate dBase IV Tech Notes for Oct 89. Useful information.
File Name File Size Zip Size Zip Type
DIALOGUE.TXT 7939 3361 deflated
FINDING.TXT 2655 1224 deflated
GETTING.TXT 3432 1426 deflated
MEMO.TXT 9047 3750 deflated
MEMO_N1.TXT 149 126 deflated
MEMO_N2.TXT 130 115 deflated
REIGNS.TXT 7721 3213 deflated
STATUS.TXT 4127 1817 deflated

Download File TN8910.ZIP Here

Contents of the DIALOGUE.TXT file


Dialogue
You just wouldn't believe how many questions the technicians here at
Ashton-Tate Software Support get. Well, you might believe it, but that's not
the point. The point is that inquisitive folks write in, call in and use our
Bulletin Board System to ask us questions, and here are a few of the more
interesting ones.

Multi-user Runtime
Q: When coding an application to run under dBASE IV Runtime in a multi-user
environment, do you use the LOCK() function and UNLOCK command to accomplish
record locking and unlocking?

A: You perform record- and file-locking operations in Runtime the same way as
you do in dBASE IV. You may want to use the CONVERT command to give greater
functionality to locking operations that are supported in dBASE IV. Check
the CONVERT command description in the Language Reference manual for further
details.

Multi-user Memory Files?
Q: In a multi-user application, I have a memory variable that acts as a
counter. The counter is restored from a .MEM file (memory file), incremented
and saved back to the .MEM file by different users. How can I be sure that
two users won't read that value from the .MEM file and increment the same
value? Is there a way to lock that file?

A: You can't lock a .MEM file since it's only open for the time it takes to
read the contents into memory. You can have your application read the file,
increment and restore the value as successive commands, but that might take a
half-second and in an active LAN application I suppose your scenario could
arise.

A more attractive alternative is to use a database as the holder of these
kinds of variables. Even though it might be a one record file, that record
can be locked while it's being updated. Also, appropriate notice could be
given to users who try to use that value while it's in use by someone else.

If you use the latter alternative, make the time between locking and unlocking
the record as short as possible. That is, try to put the commands necessary
to increment, save and unlock the record as close together as possible so
that nobody has to wait.

@...GET...MEMO
Q: Is there a way to create a memo variable type? I'd like to avoid having
to GET a memo field because I don't want to delete a newly created record.

A: Sorry, but there's no such thing as a memo variable type. What you can do
instead is to invoke MODIFY COMMAND to edit a temporary text file. Having
typed in your memo information, you can then APPEND MEMO to read from the
text file into your memo field.

Unlinked Views
Q: I'm trying to create a view using three unrelated databases. After I
create the view skeleton with all of the fields that I want, I can't save the
view; instead I get the error message "File not linked". I don't want them
to be linked! What can I do?

A: If a view is what you're looking for, you can't do anything. The files in
a multi-file view have to be linked (that's part of the definition of a
view). Sounds like there's an application (starting with a format file)
coming up. As an aside, because your files are not related, the record
pointers in the areas that are not active will not be moved when you select a
different record in the active database; this could make for very boring
listings.

Memo Editor Menus
Q: Is there any way to remove the top bar menu in the memo editor?
A: No, that will always be there.
Colors
Q: Is there any way to change the color of the clock without changing the
color of the borders and/or highlighted pop up selections?

A: Yes. Use the SET COLOR OF INFORMATION command. This will also change the
color of the status line.

Indexing on Multiple Fields
Q: I'm trying to index a file on two fields: TaskNo and EmpNo. I've tried
using the CREATE INDEX command and tagging both fields, but so far, the file
is only ordered by TaskNo.

A: You will need to create a separate index tag based on both of the fields
and name the index tag to something other than a field name. An example of
this command, as entered from the dot prompt, would be:

INDEX ON Task_No + Emp_No TAG Task_Emp
You can then use the SET ORDER command to make this the active key.
Missing Negatives
Q: Using the statement
@ 10,12 SAY Total PICTURE "@Z 99.99"
I am trying to display a calculated value. Everything is fine unless my value
equals -10, in which case it is shown as 0.00. It is only shown on the
screen that way; in the database it really is -10.00. Why doesn't the
negative number show in in Total?

A: The minus sign requires a template position when using the @...PICTURE with
negative numbers. The length of the template must be at least the length of
the number plus one for the sign. For example,


Total = -10.00
@ 10,12 SAY Total PICTURE "@Z 99.99"
displays an overflow. However
@ 10,12 SAY Total PICTURE "@Z 999.99"
correctly displays "-10.00".
Back to the Past
Q: How do I convert dBASE IV .DBF files to dBASE III PLUS?
A: Assuming that your database structure doesn't incorporate the F-type
("floating") numeric or memo fields, no conversion should be necessary. If
your files have memo fields then use the command

COPY TO TYPE DBMEMO3
to convert the .DBT (memo) files. The F-type field is another matter. If
you're planning on moving data from dBASE IV to dBASE III PLUS it would be
best to stay away from it, because the COPY command will not convert it. In
dBASE III PLUS the field type will show up as an enigmatic "EOF"and all
values for those type fields will be lost. If you do have an F-type field,
it's probably easiest to modify the structure and change the field type to N
(numeric). Now, you can go ahead and COPY the database.

Multi- or Single-user?
Q: We are thinking of running several dBASE IV applications on a Novell
network. None of these applications will be used extensively, but all will
be used from time to time by a variety of people throughout the company. Can
we use the single-user version or must we purchase the multi-user upgrade?

A: dBASE IV only comes in one flavor, which you can install as either single-
or multi-user. If the application will be run by many people, but not
simultaneously, you can leave install it as single-user, although there's no
advantage to doing so if you're installing on a network. In fact, just the
opposite. If you're installing on a network, there's always the chance that
a dBASE IV application will be run by more than one person, so you might as
well install it as multi-user and avoid having to uninstall and reinstall
later on.

You didn't ask, (but appear to be confused) be aware that, although it will
install as multi-user, the regular dBASE IV edition will only allow one user
at a time.

"What," you say, "is the point?"
Well, there are ways to make dBASE IV support more than one simultaneous use.
For instance, you could by a LAN pack (which I believe is what you're
confusing with the "multi-user version"). The LAN pack doesn't run on its
own, but adds five simultaneous users to the existing dBASE IV installation.
So, after installing dBASE IV, you get one user. After installing the LAN
pack, dBASE IV now supports six (five from the LAN pack, one from dBASE IV).
Adding another LAN pack pumps you up to eleven.

Or, instead of buying the regular dBASE IV edition, you could buy the
Developer's Edition (sort of an "enhanced" flavor, if we use the analogy
above), which comes with three simultaneous users and Runtime. With this
edition you can also add more users with a LAN pack.

Speaking of Runtime, you could use it to run your applications from and avoid
LAN packs altogether as Runtime doesn't require LAN packs to add users.
Hence, the number of simultaneous users running an application under Runtime
is effectively limited only to what the network traffic will bear.s



 December 21, 2017  Add comments

Leave a Reply