Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBUSED(JUSTFNAME(...)) is this correct?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
DBUSED(JUSTFNAME(...)) is this correct?
Divers
Thread ID:
00293430
Message ID:
00293430
Vues:
54
I just noticed that my cursor objects are trying to reopen VFP database when it is already open.

After some short tracing... :))) I have found the following:

Class Library: CDataEnv.vcx
Class: CCursor, Method: OpenTable
Class: CDataEnvironment, Method: Init

Both places above have the following code

... DBUSED(JUSTFNAME(DatabaseName)) ...

where DatabaseName is a "cursor.database" property and has a short path to the DBC.

The problem is with JUSTFNAME(), which always returns the name.extension for the DBC file. The DBUSED() always returns .F. in this case, and database opens again.

I recommend to use the JUSTSTEM() function instead of JUSTFNAME() to produce the expected results.

Serge.
Serge Matsevilo, Seattle, WA, USA
Senior Programmer/Analyst,
iServ Systems, Inc.
e-mail: smatsevilo@iservsystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform