Upload
nicholas-ryan
View
212
Download
0
Embed Size (px)
Citation preview
NTPCUG Microsoft Access SIG Oct. 15, 2011
Moving Data In and Out of Microsoft Access
A Presentation for the Microsoft Access SIG of the North Texas PC User Group
by Larry Linson, Oct. 15, 2011 .
© Copyright 2001, 2011 by L.M. Linson, all rights reserved
NTPCUG Microsoft Access SIG Oct. 15, 2011
Today’s Agenda Storing external files (can be ‘unknown
format’) in BLOBs Recreating the external file from a BLOB What topics do you want to cover in future
meetings?
NTPCUG Microsoft Access SIG Oct. 15, 2011
Storing External Files in Access DB, and recreating them later
Note: Works with files of any type or format
NTPCUG Microsoft Access SIG Oct. 15, 2011
Image File as Example “Moving Data” Database
– frmImageBlobDataEntry to acquire image» Uses Common Dialog to Obtain File
» Displays Picture
» User clicks button to validate selection
» Executes Procedure “ReadBLOB” In Module “basBLOB” Step through file, using “AppendChunk” to store into the
OLE Object type field of record
NTPCUG Microsoft Access SIG Oct. 15, 2011
Image File as Example, cont.
“Moving Data” Database– frmImageBlobSummaryList to show image
» Double Click invokes “OpenDetailForm” In Form’s Module to open frmImageBLOBDetail
– Open event recreates an image file using
– “WriteBLOB” procedure to re-create file
– Sets re-created file as Picture property
– Of Image Control to Display
NTPCUG Microsoft Access SIG Oct. 15, 2011
Image File as Example, cont.
“WriteBLOB” Procedure– From the OLE Object containing BLOB
» Calculates Number of Blocks and leftover blocks
» Generates Temporary File Name Obtain data from BLOB and Writes the external file
NTPCUG Microsoft Access SIG Oct. 15, 2011
What did he say? External File can be stored in DB
– Store as Binary Large Object (BLOB)– File type is immaterial
» Image file used as example» Could be any file type
– AppendChunk and GetChunk ops » Handle ‘pieces’ of data» Construct and extract from OLE Object field
Could also use Memo field
NTPCUG Microsoft Access SIG Oct. 15, 2011
What topics do you want? Recent has been “developer level”, VBA
code Earlier we reviewed “basics” What should be next
– Access 2010? General, incl. “classic”?– Basic – end-user features?– Advanded – developer features?
NTPCUG Microsoft Access SIG Oct. 15, 2011
Thank you
for your kind attention Please come again And, please . . .
– Gently wake your neighbor before leaving