TLobLocator used for in out variable

stef

Member³
Hi,

already used TLobLocator and because I need it only to retrieve data, there was no problem.

Now I want to parse a XML Table, quit big, but I cannot assign the value.

Getting error that handle is invalid. What am I doing wrong: C++ code

TLOBLocator * clobXmlData = new TLOBLocator(oraSession, otCLOB);
TOracleQuery* spAfasBase = new TOracleQuery(pOwner);
==>
clobXmlData->AsString = "DIT IS EEN TEST"; Assigning before or after is throwing the exception.
==>

using a function and getting data is working fine

spAfasBase->Session = oraSession;
spAfasBase->SQL->Text = " begin "
" -- Call the function \n "
" :nRStat := arrow.AfasBase.LobCreator( io_clXmlData => :io_clXmlData ); "
" end; ";

spAfasBase->DeclareVariable("nRStat", otFloat);
spAfasBase->DeclareVariable("io_clXmlData", otCLOB);
spAfasBase->SetComplexVariable("io_clXmlData", clobXmlData);

 
You will need to create the TLOBLocator instance with the CreateTemporary constructor. You can only assign values to TLOBLocator instances created with CreateTemporary.
 
Back
Top