login about faq

asked May 03 at 00:51

01011010's gravatar image

01011010
1


You can use the Download method of the ChilkatHttp object to download and save the PDF to your computer.

link

answered May 03 at 08:40

jpbro's gravatar image

jpbro ♦
1.1k2618

This method downloads the file to the file system, I would like to download the PDF to a VARBINARY(MAX). Is this approach an option?

link

answered May 03 at 14:22

01011010's gravatar image

01011010
1

For binary, you can use downloaddb in ChilkatHttp to fill a BinData object. Then you can get the binary from the BinData and add it to your SQL server.

link

answered May 03 at 15:16

emartinson's gravatar image

emartinson
148162033

Thanks for the suggestion, might you have a code example (sql) as I am not getting anywhere productive myself.

Thanks.

link

answered May 03 at 17:47

01011010's gravatar image

01011010
1

What language are you using?

(May 03 at 17:52) emartinson

I am attempting to write in tSQL.

link

answered May 03 at 18:42

01011010's gravatar image

01011010
1

I am not familiar with programming in SQL server but you can look at this to get you started. https://www.example-code.com/sql/http_download_ip_port.asp

(May 03 at 19:22) emartinson

Call http.QuickGet(the_url_for_your_PDF), which returns a Variant containing the binary bytes of the resource at the passed-in URL.

The next step is to figure out how to insert a Variant into a varbinary(max). I Googled "insert variant into varbinary max" and found many results, but this is the 1st:

http://stackoverflow.com/questions/2214628/insert-bytes-array-into-varbinarymax-record

link

answered May 03 at 19:29

chilkat's gravatar image

chilkat ♦♦
12.8k317363471

Thanks for your help, just not getting anywhere with this method. I have written an SQLCLR to accomplish this task.

Lots of interesting options here.

link

answered May 04 at 19:41

01011010's gravatar image

01011010
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×204
×16
×11
×10
×6

Asked: May 03 at 00:51

Seen: 352 times

Last updated: May 04 at 19:41

powered by OSQA