Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing Bitmaps to Image columns in SQL thru VFP
Message
From
23/07/2004 07:05:46
 
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00927048
Message ID:
00927309
Views:
20
>I have loaded bitmaps into an SQL Server 2000 table, utilizing an image column, through a remote view in Visual FoxPro 7 using a general (G) field. Another application that I have that displays bitmaps stored in SQL server tables cannot display them.

>Does VFP, like MS Access, add a header to the bitmap when storing it to an SQL image column (or alter the data in any other way)?

>Previous experience with MS Access has led to the discovery that it adds a 78-byte header to bitmaps that it stores. Does VFP do anything like that?

Well, the short answser is: you can do what you want, which is "pictures in blobs"... how:

- First avoid general fields. General datatype is a dated technology
that is ms-centric (ole-embedding) that clearly appends information to the ole-info (image or other),

- Use the "binary" datatype (with no character translation) instead. Of course you will not be able to browse the field directly (it is binary) but that can be handle properly in your form code (instruction COPY MEMO and APPEND MEMO).

- Be prepared to a few quirks (especially with the report writer which only support General fields...). But there 's a great bonus. Your data will be saved in its native format (say tiff, gif or jpeg). Crystal Reports will be able to use your pictures natively. A great bonus.

This can be done in all version of vfp starting vfp5. But vfp8 and the new vfp9 beta offers much stronger support for c/s blobs.

François
Previous
Reply
Map
View

Click here to load this message in the networking platform