Hi,
How to store .pdf in sql server 2008 in varbinary\image field using vb.net and again display in form.
Thanks
Sunil
Printable View
Hi,
How to store .pdf in sql server 2008 in varbinary\image field using vb.net and again display in form.
Thanks
Sunil
Hope this helps
That link looks aimed at web apps so, if you're using a Windows app, it's worth noting that you can read a file (any file) into a Byte array by calling File.ReadAllBytes. The File.WriteAllBytes method will do the opposite.
To display a PDF file in your form, assuming that the user has Adobe Reader installed, you can put an Adobe Reader ActiveX control or even just a WebBrowser control on your form. To display it in the default application, which may be Adobe Reader or something else, e.g. the PDF viewer built into Windows 8, call Process.Start and pass the file path. All those options require a file, so you must save the data as a file, which you might do in the user's choice of location or the system Temp folder.
Actually I want this in windows application.
Thanks
ASM