Error: DB_PAGE_NOTFOUND: Requested page not found -
03-30-2006
, 12:03 PM
Hello,
I need a help to do a query in BDBXml 2.2.13. The database and query I
am doing, works for dbxml utility, the
problem just happens when I run my cpp code.
The envflag I am using is
#define ENVFLAGS
DB_INIT_MPOOL|DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|D B_INIT_TXN
the open container is
XmlContainer cntNON_USA;
try {
dbManager = initDB();
XmlTransaction containerTxn = dbManager->createTransaction();
cntNON_USA = dbManager->openContainer(containerTxn,
nonusa_dbxml);
containerTxn.commit();
} catch (DbException &e) {
cerr << "Error opening database: " << nonusa_dbxml << endl;
exit(0);
} catch (exception &e) {
cerr << "Error opening database: " << nonusa_dbxml << endl;
cerr << e.what() << endl;
exit(0);
}
and the query code is
try {
string coordinates;
XmlManager dbManager = container->getManager();
XmlQueryContext context = dbManager.createQueryContext();
/*
* The query string
*
*/
string s = cityName;
int i = cityName.find('\'');
if (i < cityName.size())
{
s = cityName.substr(0, i - 1) + "\\" + cityName.substr(i);
}
string query = "collection(\'" + \
nonusa_dbxml + \
"\')/record[full_name_nd=\'Sao Paulo\']";
/*
* Declare the citycode variable
*
*/
XmlResults results = dbManager.query(query, context);
the exception is thrown here with the messages below
Error in query database: /opt/websrv/crsdb/geodata/non_usa.dbxml
Error: DB_PAGE_NOTFOUND: Requested page not found
Thanks in advance,
Ventura |