Drag & Drop Binary

cratediggah

New member
Joined
Nov 6, 2006
Messages
1
Programming Experience
Beginner
Hi All,

Two part question-

1) I would like to be able to drag & drop a binary file (specifically zip) onto a form (text box perhaps) and..

2) Be able to store this binary file into a (long)BLOB column in an associated Access database.

I would like to be able to eventually retrieve this file from the DB later as well. Any ideas? Thanks
 
1) Any control accepting a file as a drag target actually ends up firing an event in which a lidst of paths are transmitted to the app. Once you set the control to allow drag drop, then the dragdrop event handler will have an event object passed to which you can request an array of strings:

Dim files as String()
files = DirectCast(e.Data.GetData(DataFormats.FileDrop),String())

2) As for storing a blob in access - i wasnt aware that access had a BLOB column - whether or not it has one i'd guess its rather pointless: access is a file based database.. i.e. you have to have access to the file system to use it.. so if you have access to the file system, why not just dump your file in the file system (because that's what filesystems are for) and store the path to it in the access database? Square pegs thus get put in square holes, etc.. :D
 
Back
Top