Rafael: The funny thing is, this team CLOSED DATABASES ALL at the
beginning of the procedure or form! I personally use the Visual
Maxframe framework which opens all tables and leaves them open. That is
what I am used to.
Thanks,
On 11/4/2014 11:35 AM, Rafael Copquin wrote:
In most cases you don't need to open the database. Opening the table
sufices.
However, I found that it is necessary to open the database first,
especially if you are in a LAN. Sometimes you don't need to, sometimes
you do, I could never pinpoint why.
If you use forms with private data sessions, you should close all
tables in the unload event with the command:
close tables all
even if tables are open in the data environment and it does the
automatic closing of tables. With the above statement you ensure that
all temporary cursors open during processing will be closed when the
form is destroyed.
Note that the all clause goes in the end, otherwise you would close
all things, forms, tables, etc.
If they used the close databases syntax it is probably because they
were used to program in FPD (we are talking the year 2000), which did
not have a close tables (IIRC) syntax, and a table or a database was
the same thing. With the advent of VFP, database refers to the DBC
while table refers to the DBF.
If I were you, I would use for the new perks you add to the system
forms with private data sessions and would open all tables (even the
DBC) in the load event and close them in the unload event, as a matter
of principle.
Rafael Copquin
El 04/11/2014 12:49, Jeff Johnson escribió:
On 11/4/2014 8:22 AM, Jean MAURICE wrote:
Le 04/11/2014 16:08, Jeff Johnson a écrit :
I can't imagine why someone would do that other than simulating
free tables while using DBC's.
IMHO, when you open a table belonging to a database, the database is
automatically open. So you can use long field name, ...
For fun, as you seem to have the sources, comment all the CLOSE
DATABASES ALL and see what happen !
The Foxil
That would be fun! A web connection application as well as a network
application accessing the same tables. There are about 150 users
Georgia to California.
I like the idea though. The reason I am asking is because I am
adding new procedures to the application and don't want to create
unintended consequences.
BTW I don't find any OPEN DATABASE ? commands.
Thank,
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.