Save Access Report as PDF/Binary

前端 未结 2 1273
忘了有多久
忘了有多久 2021-01-20 18:56

I am using Access 2007 (VBA - adp) front end with a SQL Server 2005 Backend. I have a report that I want to save a copy as a PDF as a binary file in the SQL Server.

2条回答
  •  庸人自扰
    2021-01-20 19:33

    The easiest way to do this is to save the report out to disk as a PDF (if you don't know how to do that, I recommend this thread on the MSDN forums). After that, you'll need to use ADO to import the file using OLE embedding into a binary type of field. I'm rusty on that, so I can't give specifics, but Google searching has been iffy so far.

    I'd recommend against storing PDF files in Access databases -- Jet has a strict limit to database size, and PDFs can fill up that limit if you're not careful. A better bet is to use OLE linking to the file, and retrieving it from disk each time the user asks for it.

    The last bit of advice is to use an ObjectFrame to show the PDF on disk, which MSDN covers very well here.

提交回复
热议问题