PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Getting JPEG from ACCESS!

hello everybody :)

I'm working on an evC++ application that uses a .cdb database to retrieve information from.
The path is :"\windows\mydatabase.cdb".
The thing is:
I put in this database column named "picture", wixh contains OLE objects (jpeg files).
I'd like to get this object and write it back into
a jpeg file :
OLE object --> mypicture.jpg.
The current functio I use to retrive data is:
(here I retrieve an integer)

int CBaseDonnees::getItemInteger(int iItem)
{

// Fonctionnement identique a getItem
HRESULT hr;
VARIANT vIndex;
MSADOCE::IADOCEField* pfield;
MSADOCE::IADOCEFields* iADOCEFields; //Fields Object
VARIANT pvaleur ;

VariantInit(&vIndex);
vIndex.vt=VT_I4;
vIndex.lVal=iItem;


hr=iADOCERS->get_Fields(&iADOCEFields);
if(FAILED(hr)) return 0;
hr=iADOCEFields->get_Item(vIndex,&pfield);
if(FAILED(hr)) return 0;
hr=pfield->get_Value(&pvaleur);
if(FAILED(hr)) return 0;

return pvaleur.intVal;

}
You see that I can fetch an integer. But how doing this with a file (a BLOB object if I'm not mistaken?).
Does anyone have an idea?
2 more things:
- I apologize about my english level .(hope u understood the problem anyway)
- ANY help will be VERY appreciated :)