I have open the ESE database successfully by using JetOpenDatabase API. To read the records I have open the "MSysObjects" table and set the current index to the "RootObjects".
Here's my code (without error-handling):
err = ::JetOpenTable(sessionID,dbID,"MSysObjects",NULL,0,0,&tableId);
err = ::JetSetCurrentIndex( sessionID, tableId, "RootObjects" );
err = ::JetMove( sessionID, tableId, JET_MoveFirst, 0 );
to read the records I have tried the JetRetrieveColumns function to retrieves multiple column values from the current record. I have also tried JetRetrievedColumn function but I didn't get the actual result.
Is any one know that how to read the records from existing and unmounted ESE database files by using cpp?
The esent engine gives you a hint of what went wrong by the error code. Look it up here: https://msdn.microsoft.com/en-us/library/gg269297(v=exchg.10).aspx
In general you have to prepare the JET_RETRIEVECOLUMN before you do actually try to read the data via JetRetrieveColumn(s), by selecting which columns you want to retrieve, preparing buffer/pointers, etc. Of course there's more to it, but you should be a little bit more specific with your question.