Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Save a PDF to MySQL blob
Anne Tschider 
    
3 years ago
In his Access front end, my client generates a letter that is emailed to their customer as a PDF (I used your video to build that VBA; it works great). The pdf of the letter also needs to be uploaded to a blob field in an existing ODBC table that resides on a MySQL database (that feeds a web-based dashboard). The MySQL table is a linked table in the Access front end. I'd like the generated PDF to be saved to it when the letter is emailed. An insert query is my guess but not sure how to reference the pdf being generated unless I save it to a folder first. I'm sure there's a better way! Thank you for any insight.
Kevin Yip  @Reply  
     
3 years ago
You most likely need to use a passthrough query for this.  In a passthrough query, Access does not run the query, but simply passes an SQL statement to another server.  And that's what you need to do to insert files into blob fields.  Access doesn't know MySQL and can't run any MySQL-specific tasks.  It can only pass through a statement to the MySQL server.  In Access, go to Create -> Query Design -> click "Pass-Through" on the ribbon.  On the property sheet, specify the "ODBC connection string" for your MySQL database.  Then type an SQL statement using the syntax rules of MySQL.  

As to the file path location, you need to use one that is recognizable by your MySQL server as well.

An INSERT query adds a new record to the table.  If you need to add files to a blob field of an *existing* record, you need to use an UPDATE query.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/31/2026 1:09:45 PM. PLT: 0s