AppendItem in TOraNestTable (TOraArray) fails!!!
Posted: Mon 11 Dec 2006 10:44
I'm try to use Oracle Object in ODAC. I'using 5.80.0.35 trial version for Builder 6.
I'm checking if I can use oracle object feature.
I have code like this:
pWWWIp->CreateObject(_q->Session->OCISvcCtx, "RISORSATYPE");
pAllegatiIp = dynamic_cast(pWWWIp->AttrAsObject["lista_allegati"]);
if (pAllegatiIp->AttrIsNull["lista_allegati"])
pAllegatiIp->CreateObject(_q>Session>OCISvcCtx, "TAB_OF_ALLEGATI");
Where RISORSATYPE have an attribute of type Table Of AllegatoType (TAB_OF_ALLEGATI).
whil (something true)
{
pElementoAllegatoIp = new TOraObject(NULL);
pElementoAllegatoIp->CreateObject(_q->Session->OCISvcCtx, "ALLEGATOTYPE");
pElementoAllegatoIp->AttrAsInteger["id_allegato"] = 0;
pElementoAllegatoIp->AttrAsString["path_file_allegato"] = (*begit).path_file_allegato;
indexItem = pAllegatiIp->AppendItem();
pAllegatiIp->ItemAsObject[indexItem] = pElementoAllegatoIp;
}
While exeuting "indexItem = pAllegatiIp->AppendItem();" at third step,
but sometime at first step, an access violation arises.
Could you tell me why?
Other ODAC Oracle Object features works ok.
thanks in advance
Francesco L.
I'm checking if I can use oracle object feature.
I have code like this:
pWWWIp->CreateObject(_q->Session->OCISvcCtx, "RISORSATYPE");
pAllegatiIp = dynamic_cast(pWWWIp->AttrAsObject["lista_allegati"]);
if (pAllegatiIp->AttrIsNull["lista_allegati"])
pAllegatiIp->CreateObject(_q>Session>OCISvcCtx, "TAB_OF_ALLEGATI");
Where RISORSATYPE have an attribute of type Table Of AllegatoType (TAB_OF_ALLEGATI).
whil (something true)
{
pElementoAllegatoIp = new TOraObject(NULL);
pElementoAllegatoIp->CreateObject(_q->Session->OCISvcCtx, "ALLEGATOTYPE");
pElementoAllegatoIp->AttrAsInteger["id_allegato"] = 0;
pElementoAllegatoIp->AttrAsString["path_file_allegato"] = (*begit).path_file_allegato;
indexItem = pAllegatiIp->AppendItem();
pAllegatiIp->ItemAsObject[indexItem] = pElementoAllegatoIp;
}
While exeuting "indexItem = pAllegatiIp->AppendItem();" at third step,
but sometime at first step, an access violation arises.
Could you tell me why?
Other ODAC Oracle Object features works ok.
thanks in advance
Francesco L.