ESENT--read a ese database file -
the pagesize of file read 32768. when set jet_paramdatabasepagesize 32768,jetinit returns -1213.then,i set jet_paramrecovery "off",jetinit succeeds.but,when use jetattachdatabase,it returns -550.
here code:
err=jetsetsystemparameter(&instance,sesid,jet_paramdatabasepagesize ,32768 ,null); err=jetcreateinstance(&instance,null); err=jetsetsystemparameter(&instance,sesid,jet_paramrecovery,0,"off"); err=jetinit(&instance); err=jetbeginsession(instance,&sesid,null,null); err=jetattachdatabase(sesid,buffer, jet_bitdbreadonly ); err=jetopendatabase ( sesid, buffer, null, &dbid, jet_bitdbreadonly );
what's wrong it?i running windows 7 32bit.
the page size global process (not instance) , persisted in log files , database, changing page size can annoyingly tricky.
is there information in database you're trying access? or did experience during development?
if saw during development, easiest thing blow away (del .edb edb) [assuming kept prefix "edb"].
also, sure database 32k pages? can confirm esentutl.exe -mh <database-name>
.
it trickier recover data if care about, , switched page size. (i don't know off top of head, , i'd have try few things out...)
-martin
Comments
Post a Comment