Dear All,

How to retrive PDF Binary data from sqlserver and save to PDF file using VC++ ?

our code is:
qry="select document from emptable where empno=1"//document field is image datatype
crs->Open(CRecordset::snapshot,qry,CRecordset::readOnly|CRecordset::executeDirect);

while(!crs->IsEOF())
{
crs->GetFieldValue("document",strDocument);

}
we have retrive binary data using CString but when we write this data into a PDF file it is NOT working.

we think the problem is CString So without CString and GetFieldValue() how can we retrive data?
Please give to us your suggestions.

Thank you,
medwrite.