I'm trying to read unmounted EDB files via esent.dll . Everything works with 4k paged databases, but when I try to read 8k paged one, it returns error-1414 -> The secondary index is corrupt and the database must be defragmented. But defragmenting with eseutil won't solve the issue. (the eseutil is from the bin folder of the same exchange server created the .edb)
JET_ERR err;
JET_INSTANCE instance;
JET_SESID sesid;
JET_DBID dbid;
JET_TABLEID tableid;
JET_COLUMNDEF columndef = { 0 };
JET_COLUMNID columnid;
Call(JetSetSystemParameter(&instance, JET_sesidNil, 64, 8192, NULL)); //JET_paramDatabasePageSize - 64
Call(JetSetSystemParameter(&instance, JET_sesidNil, 34, 0, NULL)); //JET_paramRecovery - 34
//Call(JetSetSystemParameter(&instance, JET_sesidNil, JET_paramCircularLog, 1, NULL));
Call(JetCreateInstance(&instance, "instance"));
Call(JetInit(&instance));
Call(JetBeginSession(instance, &sesid, 0, 0));
JET_PCSTR FileName = "C:\\Users\\user\\Desktop\\EDB\\First Storage Group\\Mailbox Database.edb";
Call(JetAttachDatabase(sesid, FileName, 0));`
And it won't attach the database.. What seems to be the problem, in your opinion?