P
Pavils Jurjans
Hallo,
Could someone please enlight me, telling what kind of data actually is saved
in the MS Access OLE object field?
I did some testing, and wrote a code that takes a file, reads it, and stuffs
the data into OLE object field. Since in no time I pass any information
about what *kind* of data these are, then in table view mode I see text
"Long binary data" in that field.
Now, I can right-click that field in the teble view mode, and choose "Insert
Object" from the menu. The I can choose "create from file", and browse for
certain file, and finally, I can choose to link or embed that file in the
database. After choosing a jpg file, and clicking Ok, I get "Microsoft Photo
Editor 3.0 Photo" in that field. So, obviously, the field also contains at
least two more data properties -- an OLE server ID, and file name, if it is
linked rather than embedded. Or maybe it contains MIME type information? I
can't really get any documentation about these tech specifics of MS Access
BLOB fields.
So, what actually is preferred way to store file information in the database
then. Please don't come up with cliche "It's generally not suggested to
store binary information in the database", I am very well informed. I just
want to know if it is suggested to store anonymous binary string in the BLOB
field and then provide MIME type in separate text field, or it's better to
store the binary data type along with the data in the same BLOB field. If
it's the latter, I am afraid that I don't know how to separately tell the
field, what type the data is, using standard DAO syntax.
Rgds,
-- Pavils
Could someone please enlight me, telling what kind of data actually is saved
in the MS Access OLE object field?
I did some testing, and wrote a code that takes a file, reads it, and stuffs
the data into OLE object field. Since in no time I pass any information
about what *kind* of data these are, then in table view mode I see text
"Long binary data" in that field.
Now, I can right-click that field in the teble view mode, and choose "Insert
Object" from the menu. The I can choose "create from file", and browse for
certain file, and finally, I can choose to link or embed that file in the
database. After choosing a jpg file, and clicking Ok, I get "Microsoft Photo
Editor 3.0 Photo" in that field. So, obviously, the field also contains at
least two more data properties -- an OLE server ID, and file name, if it is
linked rather than embedded. Or maybe it contains MIME type information? I
can't really get any documentation about these tech specifics of MS Access
BLOB fields.
So, what actually is preferred way to store file information in the database
then. Please don't come up with cliche "It's generally not suggested to
store binary information in the database", I am very well informed. I just
want to know if it is suggested to store anonymous binary string in the BLOB
field and then provide MIME type in separate text field, or it's better to
store the binary data type along with the data in the same BLOB field. If
it's the latter, I am afraid that I don't know how to separately tell the
field, what type the data is, using standard DAO syntax.
Rgds,
-- Pavils