Stan
Stan

Reputation: 21

How to prevent the creation of a temporary file tmp.edb during opening ESENT database?

When I try to open ESENT database, a temporary file "tmp.edb" is created in program dir. I can change the path using JET_paramTempPath but, I can't find how to disable it.

Can I read DB without creation of temporary files?

Here's my code:

JetSetSystemParameter(nil, nil, JET_paramDatabasePageSize, iPageSize, nil);
JetSetSystemParameter(nil, nil, JET_paramRecovery, nil, 'Off');
JetCreateInstance(&FInstance, nil);
JetInit(FInstance); //Here file "tmp.edb" is created

JetBeginSession(FInstance, &FSession, nil, nil);
JetAttachDatabase(FSession, FFileName, JET_bitDbReadOnly);
JetOpenDatabase(FSession, FFileName, nil, &FDatabase, JET_bitDbReadOnly);

Upvotes: 2

Views: 204

Answers (1)

Ian Boyd
Ian Boyd

Reputation: 257001

There is no way to suppress creation of a temporary database file.

It is a fundamental concept of how ESENT operates, and cannot be turned off.

Upvotes: 0

Related Questions