Hi, I'm trying to retrieve a BLOB from an Oracle9i server.  When ever I try to retrive the BLOB it fails with an Invalid handle message.  However inspecting the length returned from the PLSQL function returns the correct size, while using the ->Size property fails (Invalid Handle).  The only two functions that don't produce an invalid handle are the ->IsNull() (a silly way of doing things if you ask me) and the ->Seek() function.
Any ideas - anything I have done wrong? The Oracle admin says the function is there and working correctly, the data is being returned, but I can't get at it without generating an exception.
------------------
--
Graham Reeds,http://omnieng.co.uk | grahamr@omnieng.co.uk
				
			Any ideas - anything I have done wrong? The Oracle admin says the function is there and working correctly, the data is being returned, but I can't get at it without generating an exception.
Code:// set up code etc. ... int length; pObLocator = new TLOBLocator(Oracle9i, otBLOB); pObLocator->SetEmpty(); OracleQuery1->SetVariable(":ELR", szELR); OracleQuery1->SetComplexVariable(":RETBLOB", pObLocator); OracleQuery1->Execute(); length = OracleQuery1->GetVariable("LENGTH"); if (pObLocator->IsNull() | | length==0) { delete pObLocator; pObLocator = 0; throw Exception("Error: Unable to get valid CurveBlob."); } pObLocator->Seek(0, soFromBeginning); // pObLocator->SaveToFile("C:\temp\blob.bin"); // borks // int size = pObLocator->Size; // borks also char *pBlob = new char[length]; pObLocator->Read(&pBlob, length);
------------------
--
Graham Reeds,http://omnieng.co.uk | grahamr@omnieng.co.uk