Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CAn anyone help me how to get Binary data from databse and display in PDF using VB 6.0

What I have tried:

I am not finding any solution .pls help.
Posted
Updated 27-Aug-20 2:55am
Comments
F-ES Sitecore 27-Aug-20 8:07am    
The fact that you don't think it is relevant to tell us what the database is makes me think the task is probably beyond you. Also VB6 has been dead for a long time, you'll struggle to find anyone who can help you or any resources making this task even harder still. If I was you I'd google for "COM PDF viewer" to see if you can find a COM-based PDF viewer that someone else has written and just use that in your project.

1 solution

Nothwithstanding that VB6 is long dead, you can use the VB6 "Web Browser Control" in Shdocvw.dll to display PDFs. Or you could embed PDFViewer.dll from Adobe Reader if you have it.

As to getting the data from the database - we can't really help without details of the database and how you have stored the binary data, but I will say that you need to ensure that you write the raw binary data to the file i.e. don't use a "text" file
VB
Open YourFilename For Binary Access Write
That's about as much as I can remember, I haven't had a VB6 install for nearly 20 years at home. This would all be a lot easier if you ditched VB6 (after all, Microsoft have) and used a more modern (e.g. .NET based) language
 
Share this answer
 
Comments
prusty from New Delhi 1-Sep-20 2:03am    
Thanks for this info.

Could you pls try from your end and let me know,bcoz i am new in VB6 and not finding any soultion from any of the forum.
CHill60 1-Sep-20 6:06am    
I can't try...I don't have VB6 any more and I'm not going to waste my money buying it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900