From Mervyn Bick <invalid@invalid.invalid>
Date Mon, 5 Dec 2022 07:50:55 +0200
Newsgroups dbase.getting-started

On 2022/12/02 23:27, ED wrote:
> I am getting killed with compiled dBase not acting like native dBase.
> I use a type code of I to identify an inventory part.
> latest  thing is the capital letter I not being recognized as that in the compiled WFM.
> I can fix it (like in an invoice), by typing a capital I over the I in the invoice.
> dBase doesnt put the top and bottom on the I like in the above text. That has never bothered me so much

I've been using dBASE for a LONG time and the only thing that I know of
that works in the IDE but not in a .exe file is a simple print statement
in the source code that outputs to the Results Pane.

What does your program do when you run it from the IDE and what is
different when you run the .exe file?

We need to see the actual code that is causing the problem.  Please copy
and paste it rather than typing it into the message.  Even better would
be if you can create a simple example form that shows the problem.  If
it needs a table then create a little test table that can be included
with the example.

What version of dBASE and what version of Windows are you using?

dBASE is case-insensitive when it comes to file names, commands,
variable names, functions, object names and object properties.

cTest = 'Whatever'
?ctEsT // dBASE will print Whatever in the Results Pane.

Generally, comparisons involving strings are case-sensitive.  An
exception is when a SQL expression is used in a rowset's applyLocate()
method.  Here the rowset's locateOptions property can be changed to
allow various matching options.  This does NOT work for a simple
comparison such as

     if form.rowset.fields['doc_type'] value = 'I'

If the field contains i that test fails both in the IDE and in a .exe
file.  I'm using dBASE 2019 and Windows 10 64-bit.

If the I is entered by the user you don't know if the user will enter i
or I.  You either need convert it to uppercase before you save it or
convert whatever is in the field to upper case before you compare it to
the list of possible values.

     if upper(form.rowset.fields['doc_type'] value) = 'I'

This will test true whether the field contains i or I