>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.