Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Store Images
Message
From
09/09/2006 12:28:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/09/2006 05:28:12
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01152528
Message ID:
01152549
Views:
22
>Hi All,
>
>I want to ask if there is a way to store images in the table I write these commands but its give me error "File does not exist"
>
>gImage = GETPICT()
>IF EMPTY(gImage)
>RETURN
>ENDIF
>APPEND GENERAL images.photo FROM "gImage"

The last line should be without quotation marks, i.e. you should use a name expression instead:

APPEND GENERAL images.photo FROM (gImage)

But I agree with the others - general fields are bad. They were a way to have stored documents ten years ago, and the practice has proven that this was a dead end.

The general field stores the document plus some header, and the bad thing about it is that the header contains a .bmp preview version of the document. BMP files are uncompressed, which is why a 50K image may be stored as 50k jpg plus 1M bmp, totally defeating the purpose of the jpg format.

Another bad side is that a general field relies on an outside application being registered on the machine for handling the file type. This is decided by either the extension of the file, or by the CLASS clause in the Append General command. The trouble is that there's a myriad of applications out there, specially for images, and your code has to trust them to do what they're supposed to do. Which may not work everywhere - I've had situations where there was no app registered on user's system to handle .jpg files, because at some point there was one, then was uninstalled, and the uninstall typically doesn't try to re-register the filetypes to previous app which was in charge. So the code using general fields simply broke because of something that was out of app's control.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform