BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I know the file format stored in TBlobField?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Emmanuel
Guest





PostPosted: Mon Jan 26, 2004 10:25 am    Post subject: How can I know the file format stored in TBlobField? Reply with 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
Jayme Jeffman Filho
Guest





PostPosted: Fri Jan 30, 2004 11:54 am    Post subject: Re: How can I know the file format stored in TBlobField? Reply with quote



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





PostPosted: Sat Jan 31, 2004 2:37 am    Post subject: Re: How can I know the file format stored in TBlobField? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.