Aug 21, 2016 at 10:26 AM
Edited Aug 21, 2016 at 2:29 PM
I'm currently trying to open the Groove Music Database to read from there the my playlists.
But when I try to JetAttachDatabase I get the follwoing error:
The database page size does not match the engine
The ESEDatabaseView Application can open the database, so the file is not invalid.
I tried to set the DatabasePageSize using follwoing method before the new Instance() constructor
SetIntegerParameter(Esnet.JET_INSTANCE.Nil, Esnet.JET_param.DatabasePageSize, 8192)
private void SetIntegerParameter(Esnet.JET_INSTANCE inst, Esnet.JET_param param, int value)
Esnet.Api.JetSetSystemParameter(inst, Esnet.JET_SESID.Nil, param, value, null);
But I got the same error for 8192 16384, and 32768 always the same error, for 2048 I got a invalid parameter error.
Does someone know how to figure out the page size by the database file? Or how to debug the file?
I uploaded my GrooveDatabase with logs if someone wants to try...
Thanks you for help :)
I used the advice in this answer
and set instance.Parameters.Recovery=false;
This way I figured out that the size seem to be 8192, since when callling it with 4096 I still get the The database page size does not match the engine. But with 8192 I get the error Database was not shutdown cleanly. Recovery must first be run to properly
complete database operations for the previous shutdown.
Then I further tried the advice:
SetIntegerParameter(Esnet.JET_INSTANCE.Nil, Esnet.JET_param.DatabasePageSize, 8192);
var inst = new Esnet.Instance("GrooveMusicExporter");
inst.Parameters.Recovery = true;
// paramLogFilePath is the underlying setting. FilePath is a misleading name because it means the directory.
inst.Parameters.LogFileDirectory = databaseDir;
inst.Parameters.LogFileSize = 2048;
inst.Parameters.BaseName = "edb";
This results in the error Database was not shutdown cleanly. Recovery must first be run to properly complete database operations for the previous shutdown.
But I still don't know how to open the database, I mean Groove and ESEDatabaseView don't get the error. Do I have to use ESEUTIL?
I found this post
Is there yet a way to recover it whith this libary and without esnetutil?