Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Blob to PDF problem

243 views
Skip to first unread message

luis.pe...@gmail.com

unread,
Aug 13, 2012, 3:37:31 AM8/13/12
to
Hi...Gurus
I have a problem when recover a Blob (image field) of SQL Server 12

I store in DB a pdf file..

Read...
int li_fnum
string ls_archivo
blob lb_doc
ls_archivo="c:\report.pdf"
li_fnum=FileOpen(ls_archivo,StreamMode!,Read!,LockRead!,Replace!,EncodingANSI!)
ll_bytes=FileReadEx(li_fnum,lb_doc)
fileclose(li_fnum)

Save....
insert tabreport(fld_cod,fld_report) values (1,:lb_doc) using sqlca;
commit using sqlca;
updateblob tabreport set fld_report=:lb_doc where fld_cod=1 using sqlca;
commit using sqlca;

Read....
selectblob fld_report into :lb_doc from tabreport where fld_cod=1 using sqlca;

ls_archivo="c:\report.pdf"

li_fnum=FileOpen(ls_archivo,StreamMode!,Write!,LockWrite!,Replace!,EncodingANSI!)

FileWriteEx(li_fnum, lb_doc)
FileClose(li_fnum)

tab_1.tabpage_2.ole_doc.object.LoadFile(ls_archivo)

------------------
All work good.....but when open the file de Acrobat Ole say "An error exist on this page. Acrobat may not display the page correctly. Please contact the person who create the PDF document to correct the problem."

but i can see de PDF later of this message , but if the PDF have picture the image quality lose..the picture...

I make too many read a write with diferent parameter but the message all time appear...the PDF i can see but this meessage a this lose quality of picture is a BIG problem.... for aplication and User

can someone help me
Luis










Bruce Armstrong [TeamSybase]

unread,
Aug 16, 2012, 2:02:55 PM8/16/12
to
This group is active on the Sybase server. However, the feed between Google and the Sybase server is not currently working. You may want to access the Sybase newsgroups directly at:

http://www.sybase.com/detail_list?id=11507&pageNum=1&multi=true&show=1248
0 new messages