高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】selecting Inserts By Name
selecting inserts by name
selecting inserts by name
using the latest version of the libraries (and version 2.2), this code works fine
odstring inserttype("insert");
odresbufptr rb = odresbuf::newrb(0, inserttype);
oddbselectionsetptr psset = oddbselectionset::select(pdb, rb);
odstring s;
int count = psset->numentities();
s.format(dd_t("%d block inserts"), count);
but this code fails with an exception:
odstring inserttype("insert");
odstring blockname ("hydrant");
odresbufptr rb = odresbuf::newrb(0, inserttype);
rb->setnext(odresbuf::newrb(2, blockname));
oddbselectionsetptr psset = oddbselectionset::select(pdb, rb);
odstring s;
int count = psset->numentities();
s.format(dd_t("%d block inserts with name hydrant"), count);
is there a way i can select by block name?
thanks.
most probably the exception's description (oderror::description()) says that odbagfiler drx is missing.
if this module presents than the code you provided works.
sergey slezkin
|