Information générale
Catégorie:
The Mere Mortals Framework
Titre:
Database Not Found and MetaDBC.dbf record count is 0
I changed the 'Data' folder to another position in order to have several users sharing the same database. My first problem came when classes.dbf could not be accessed for modification because I included it into the project.
Now that classes.dbf is not into the .EXE file and is distributed separately, the database is found and the application work fine except for a couple of messages shown at start up. “Database not found message” and a 'Wait Window' message showing “MetaDBC.dbf record count is 0”.
After checking the code, I found that the init event of the cDataEnvironment class retrieves the default database from metadbc and checks for its existance as shown on the next piece of code:
*-------------------------------------------------------------
*-- Get the name and location of the default database for this
*-- data Environment
*-------------------------------------------------------------
IF This.lCheckDefaultDatabase AND TYPE('gl_MMDEBuilder') != 'L'
this.cDefaultDatabase = this.GetDefaultDatabase()
IF EMPTY(this.cDefaultDatabase) OR !FILE(this.cDefaultDatabase)
=ErrorMsg(CANNOTFINDDATABASE_LOC + " " + this.cDefaultDatabaseName)
RETURN .F.
ENDIF
ENDIF
Since the database has been moved to another directory the ErrorMesage funtion is called. Furthermore metadbc.dbf is no included in the project and an empty is created first time executed.
On the other hand it is not necessary to distribute Classes.dbf . “If you do not intend to change this table in the future, you can simply include it in your distributed app/exe file rather than distributing it separately.” (Devguide).
What am I missing in order to stop the “Database not found” and the “Wait Window” message from popping at start up?
What Classes.dbf and metadbc.dbf have to do with the user preferences?
Thanks in advance for any tips.
Oscar
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement