[comp.databases] dBASEIII+ question, HELP !!!

danielg@uncmed.med.unc.edu (05/17/89)

Ever have a looooooonnnnnggggg day programming?  Sure you have.  I've been
wrestling with dbase for two days now, and now even my local gurus are
stumped - Alistair, are you out there?

Actually, may be a simple problem.

I have created a view file that uses a predefined screen format.  However,
when the fmt file goes to get the respective fields, it interrupts saying
'variable not found'.  It locates the first field in the database, but
can't find the next.

Here's what I've done so far:

	I've deleted the field from the format screen and reloaded it.
	Still no dice.

	I've deleted the field from the format screen and not reloaded it.
	On the next run, it finds the first field, finds the next field,
	then gives the same error message on the third.  All three fields
	are from the same database.

	I've checked to be sure that the field name called in the fmt file
	matches the field name in the database.

Please help.

With much gratitude, 

--dan

--


 Disclaimer: My opinion means | 'If you only knew how much I was holding
       nothing, but His means |  back, you would commend me'
       everything.            |      - Charles Spurgeon, 19th century 
 danielg@uncmed.med.unc.edu   |        evangelist (on humor in preaching)

awd@dbase.UUCP (Alastair Dallas) (05/19/89)

Daniel--

I need more information to help you; your message was very vague as to
how you set up the "view file that uses a predefined screen format" and
what circumstances cause "the fmt file to go and get the respective fields."

As I understand it, you get 'Variable not found' when running an FMT file.
This would be the case if the field referenced in an @ GET statement was
not in the current referencing environment.  That is, if you ran the format
file before you put the database file in USE.  Try USEing the database
file in question before using the format file with a command like EDIT.

If that doesn't work, or I missed your point, let me know.

/alastair/

emuleomo@yes.rutgers.edu (Emuleomo) (05/20/89)

Sounds like another classic DbaseIII+ bug!
I used to have the screen painter in DbaseIII freeze on me randomly
in those days. 
You may be better off writing those @ <row>,<col> SAY ... GET ... stmts
instead of using the view.
OR you can use a DbaseIII clone to run your program.  They usually work better!

Cheers

-- Emuleomo O.O.

fisher@sc2a.unige.ch (Markus Fischer) (05/30/89)

In article <440@uncmed.med.unc.edu>, danielg@uncmed.med.unc.edu writes:
> I have created a view file that uses a predefined screen format.  However,
> when the fmt file goes to get the respective fields, it interrupts saying
> 'variable not found'.  It locates the first field in the database, but
> can't find the next.

The first question is whether this is a `view' problem or a `fmt' problem:

- What happens if you simply `use' the dbf-file, and set the screen format ?

If the format-file is ok, that means that you can't use a `view' file in
that context.  You see, the point is that you have no control on the order
of commands in the view file !  If the siutation is a little complex, like
a relation, a `set fields' or (worse) on index *through* a relation, you
never know if all needed parameters have been set correctly for a given
command.  This is what you could try :

- Check the `fmt' file with a minimal configuration.
- Check the field-names for reserved words (`to',`for',`get' :-)
- If several databases are involved, be sure to use the full syntax for
  referencing fields : ALIAS->FIELD.
- Write a program seting up the view you want (easier to maintain)
- Create the view file (`from environment') again...  if the `view' doesn't
  work, drop it !  (i.e. use a `prg' instead)

Voila !  Actually, this looks more like a `set fields' problem, or perhaps
an `illegal field name' problem...

Good luck !

Markus Fischer                -|--|--|--|--|--|--I   Department of Anthropology
                        -|--|--|--|--|--|--|-(#)-I   University of Geneva
      -|--|--|--|--|--|--|--|--|-(#)-|-(#)(#)(_)-I   CH-1227  Carouge (GE)
   -&-(_)-|--|--|-(#)-&--|-(#)(#)(_)(#)-&-(_)(#)-I   Switzerland
            -|--|--|--|--|-(#)(_)-|-(_)(_)(_)(#)-I
black (#) to kill ! --|--|-(#)(_)(_)(_)(#)(#)(_)(_)  fisher@sc2a.unige.ch
=+==+==+==+==+==+==+==+==+==+==+==+==+==+==+=(#)=+   fisher@cgeuge52.bitnet