do better next time, I promisse.
Thanks for your patience and understanding. Your help and rest of this group
members is very important to me.
to you all.
Have a nice week.
posting about checking if a form is already Open.
Post by unknownOn Sat, 8 Nov 2008 19:15:47 -0500 Ivan Benttini
Newsgroup: dbase.programming
Post by Ivan BenttiniIvar,
Thanks friend, you are great.
Ivan,
I am glad if my reply was of any help, although I don't really understand
in which way it helped.
I know you have only used dBase Plus and the newsgroup for a short time
and it looks like you are
doing fine, but let me suggest, that when you post some code and ask for
comments, then please stick
to the code you posted.
Post by Ivan Benttinithis some how was missing in the code of my datamodule.
Mea culpa...I thought, it did happen auto. when I create
the datamodule. I will never finish learn dBase as ou can see...
What was missing, and what should happen auto?
Post by Ivan Benttini//////////////////////////////////////////////////
with (this.NA1.rowset)
//autoEdit = false
indexName = "FNAME"
endwith
//////////////////////////////////////////////////
The above lines of code was not in the message you posted, and they deal
with a query named NA1. Why
do you introduce a new query and how does it relate to the code in the original posting?
Post by Ivan BenttiniThe above lines of code plus the creation of the INDEX with the lines below
// close databases
// use NA exclusive
// index on upper(fname) tag fname
// close databases
is a must for SEEKER to work happy, I know now.
When I saw your original code I got the impression that you had read the
instructions in the header
of seeker.cc and already knew that an index was needed.
"Thanks, I solved the problem by making the following changes to the code
Changed the databasename from "dBase Files" to "dBaseSamples" and by uncommenting the lines
indicated below.
sql = 'Select * from "Names"'
active = true
endwith
//with(this.NAMES1.rowset) // <--- uncommented
//indexName="fname" // <--- uncommented
//masterRowset=form.NAMES1.rowset
//masterFields="NAMES1"
//endwith // <--- uncommented"
Post by Ivan BenttiniNow maybe you can help me with an [ if ] statement to go in my code just
**************************************************
if file (NA.mdx) already exist (I don't know how to code this line)
//don't do nothing
else
close databases
use NA exclusive
index on upper(fname) tag fname
close databases
endif
**************************************************
since I could not find anything on the help file for this,
Open the help file, select Tab 'Search'. In the field marked '1.' type the
words: file exist. In
field marked '3.' scroll down to find a likely topic, when you arrive at
the letter e you will
notice 'exist() [File}. It looks promising, select it and read the
explanation and study the code in
the example.
Now go back to the Search Tab an select the next topic, which is 'File
commands and functions'. Open
it and read the explanation; the is nothing we can use. The try the next
Topic, 'File information
functions', open it and notice that it talks about File class method
'exists()' and a similar
function File(). We now have two ways to check if a file exists. Did you
use the help file in this
way to seach for a useable function?
You could also go to Help -> Language Reference -> Files and Operating
System. Then start from the
top and at the third Topic you will find what you are looking for.
Post by Ivan Benttiniand I am assuming that the above code create an .mdx
index file, am I right?
Maybe, who knows :-) If you close the database where the table is how
would you open the table?
Post by Ivan BenttiniI just would like that to be on the form code always, in case
later the index gets corrupted. What you think?
It should not be necessary. If the index becomes corrupted find out why it
happens and take steps to
prevent it.
Ivar B. Jessen