Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Configuration path is empty
Tue, Aug 6 2013 9:35 PMPermanent Link

Peter Evans

Still trying to get a migrated DBISAM to ElevateDB program to work.

I have (hopefully) made all the coding changes required. This has
required days of work because all my databases are created on the fly.
Also tables are created and destroyed on the fly. The destruction of a
table may result in its databases being destroyed.

The problem I am having is more basic than that part of the system.
Currently I can not even log into my system. This database is on disc
and created when the system is installed. Should be easy.

When trying to run a query against the User table in the database I get
the error "Error #409 The configuration path is empty".

However the path is not empty.

In the unit edblocal it has the procedure ConfigPathError. The error
arises there. The only call to that procedure is from the procedure
CheckConfigPath. I can see that FSettings.ConfigPath must equal ''.

However I have traced the program flow :-

 FormMain.DBMain.DatabaseMain.Connected := False;
 FormMain.DBMain.EDBSession1.LocalConfigPath := App.AppDataUserAll +
'\SYS\';
 ShowMessage( blah blah   <=== shows the correct path set in line above
 FormMain.DBMain.DatabaseMain.Connected := True; <== error here

Any ideas?

Should I have the trailing slash?

Regards,
  Peter Evans
Tue, Aug 6 2013 9:54 PMPermanent Link

Peter Evans

On 7/08/2013 11:35 AM, Peter Evans wrote:
> Still trying to get a migrated DBISAM to ElevateDB program to work.

Perhaps it is a problem with the files that get installed by the installer?

I migrate from DBISAM to ElevateDB and these are the files:-

EDBConfig.EDBCfg
EDBConfig.EDBLck
EDBDatabase.EDBCat
EDBDatabase.EDBLck
User.EDBIdx
User.EDBTbl
etc.

All the above get installed into the SYS folder.

Regards,
  Peter Evans
Wed, Aug 7 2013 3:32 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Peter


Have you set the engine to use the local settings? If not that could cause the error.

I can never remember the full name of the property but I think its the last one on the engine component.

Roy Lambert [Team Elevate]
Wed, Aug 7 2013 8:57 AMPermanent Link

Peter Evans

On 7/08/2013 5:32 PM, Roy Lambert wrote:

>

I have solved this problem. The error is misleading.

According to 'edb2rsdelphiwin32unixe2.pdf' section
TEDBSession.LocalConfigPath Property :-

"This property overrides .... and the TEDBEngine
UseLocalSessionEngineSettings property is set to True."

I am using the default Engine. I do not have an Engine component. When
testing that property it was False.

I then explicitly set

   Engine.UseLocalSessionEngineSettings := True;

Now I do not get the error.

Regards,
  Peter Evans


Wed, Aug 7 2013 9:26 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Peter


A) I have to say how brilliant I am <vbcg>

B) Its sort of misleading but not really. With UseLocalSessionEngineSettings set as false the engine is looking for whatever you've put in the default engine component's ConfigPath. I'll bet that is empty so its looking at wherever you start the app from (or that's my guess) and can't find anything hence "Error #409 The configuration path is empty"

Admittedly this should be "Error #409 The configuration path is empty of anything remotely usable by ElevateDB" but that's another story Smiley

Bearing in mind that you can (if you want) have multiple sessions pointing at different databases (remote and local if you're mad enough) at the same time its difficult to see what could be done to give a better error message.

That property is the main reason why I drop an engine component onto the app. Without it I can't set the property at design time and open my databases in the IDE.

Roy Lambert [Team Elevate]
Image