 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Emmanuel Guest
|
Posted: Mon Jan 26, 2004 10:25 am Post subject: How can I know the file format stored in TBlobField? |
|
|
Dear all,
TBlobField can store all kind of data, eg: jpg, gif, doc
but how can I know what kind of data stored in the TBlobField?
Emmanuel
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Fri Jan 30, 2004 11:54 am Post subject: Re: How can I know the file format stored in TBlobField? |
|
|
Hello Emmanuel,
When you store a file in a "BLOB" field you load the file as a stream into the field, so if you can open the file and check if it is of the correct type you can also check if the blob is from any type. You only need to have documentation on the files you are working with. So you should ask Microsoft for a way of identify if a certain file is a MS Word file or not and so on. Search the Internet for ways of identify the files you will work with.
HTH
Jayme.
"Emmanuel" <emmanuel (AT) erphk (DOT) com> wrote
| Quote: | Dear all,
TBlobField can store all kind of data, eg: jpg, gif, doc
but how can I know what kind of data stored in the TBlobField?
Emmanuel
|
|
|
| Back to top |
|
 |
bcb Guest
|
Posted: Sat Jan 31, 2004 2:37 am Post subject: Re: How can I know the file format stored in TBlobField? |
|
|
Hi Emmanuel.
Just a small suggestion if I may. Perhaps you can add an extra field to the
database(can be small size 3 Alpha field) which you can use to store the
file extension before/after you stream the file to the blob field. You can
use the VCL ExtractFileExt function to get the file extention from the
file's path name.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|