This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Negative owned pages from JetGetTableInfo

description

I have this code:
int ownedPages;
Api.JetGetTableInfo(session, tbl, out ownedPages, JET_TblInfo.SpaceOwned);

And it returns negative results

Same for:

JET_OBJECTINFO result;
Api.JetGetTableInfo(session, tbl, out result, JET_TblInfo.Default);
var usedSize = result.cPage*SystemParameters.DatabasePageSize;
Any reason for that?

comments

laurionb wrote Jul 4, 2016 at 5:20 PM

Integer overflow? If your database is bigger than 2GiB then try casting result.cPage to a long before the multiplication.