Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / July 2005

Tip: Looking for answers? Try searching our database.

ADP: How to use button control to view a binary image?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Altemir - 10 Jul 2005 18:04 GMT
I have an ADP/SQL Server table that has a column called "Document" with
data type = image.

Does anyone have an example of some VBA code that I can use in the
OnClick event of a form button that will retrieve the long binary image
and open it up for viewing with the proper Windows application?  (my
application primarily stores text files that can be opened in Notepad).

Thanks.
Philipp Stiefel - 11 Jul 2005 07:42 GMT
> I have an ADP/SQL Server table that has a column called "Document" with
> data type = image.
[quoted text clipped - 3 lines]
> and open it up for viewing with the proper Windows application?  (my
> application primarily stores text files that can be opened in Notepad).

Have look at this KB-Article:
http://support.microsoft.com/?kbid=194975
It demonstrates how to read/write files from an Image-Field in the
database.

For opening that file with the proper application, you may use the
"ShellExecute" API-Function. I don't have any sample available for
this, but you should easily find one when searching for that keyword
in Google.

In most cases it may be sufficient to simply use:

Application.FollowHyperlink yourFileName

to open the file.

Cheers
Phil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.