Click here to Skip to main content
14,838,479 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm writing a program to read edb file in c++
I've tried with esent windows library and I got "The database page size does not match the engine" error on "JetAttachDatabase"

And i also tried "libesedb" library, but i can't understand how to use it.

Is there any other way to read edb in c++ or how can I fix errors

What I have tried:

err = ::JetInit(0);
if(JET_errSuccess != err) return err;

JET_SESID sessionID = JET_sesidNil;
err = ::JetBeginSessionA(0, &sessionID, 0, 0);
if(JET_errSuccess != err) {
  return err;
err = JetAttachDatabase(
); // error -1213 "The database page size does not match the engine"
Updated 9-Aug-20 18:16pm

1 solution

There's a discussion here on SO that *may* help (as much as I hate to point someone in that nest-of-vipers direction) edb - Esent database engine limited to specific page sizes? - Stack Overflow[^]
Member 14573258 10-Aug-20 1:09am
Is there any example?
Garth J Lancaster 10-Aug-20 2:20am
It's *really* hard to find information out there ... it looks like you would do something like this
JET_INSTANCE instance;
JetCreateInstance(&instance, "instance"));

JetSetSystemParameter (&instance,
and that means your line
err = ::JetInit(0);
err = ::JetInit(&instance);

These are the references I found
Garth J Lancaster 10-Aug-20 2:22am
This article here may also help in general terms

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900