Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Frustration using OLE with Insert Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00428966
Message ID:
00428983
Vues:
12
Hi!

First of all, never use GENERAL field to store images or files. It is much more headache than benefits. Yes, data really stored in general field, but they stored in internal format.

The best way is to store all pictures in some folder on the server and store path only in the database. Than in reports you will be able to print any of them using picture field. VFP supports many picture formats (TIFF is not supported), so hope this is not a problem.

I you still need to store picture in database, use Memo field and FileToStr() function to store file in the memo field (or low-level functions if file is large, ~>5MB ). Than, before printing, you will need to save all these pictures to disk (using StrToFile() function or low-level functions if file is large).

YMMV, but general fields are too hard and confusing to use them seriously.

>I have a db with a general field where I'm storing a picture of a product we sell. Then I want to print it in a report...easy right?
>
>I have a form with an OLE control. I'm using "Insert Object" from the Edit menu to insert the image. No Problem.
>
>Problem is if I insert an object from a file it seems to store the icon with the file name instead of the image itself. So when I print it in a report I get a printout of the icon, which does no good. I made sure the "Display as Icon" checkbox was not checked.
>
>If I insert an object via "Create New -- Image Document" then append the image I seem to get a plethoria of other problems related to imaging sizing. Once thing is for sure the images are of all different sizes and resolutions. And it seems to me that FoxPro is ill equiped to handle it. I could go on an on, with the things I've tried.
>
>With the general field, is the file actually stored in my vfp database or is it just a reference to the original file. If so why won't the report program scale the file properly, or will it only scale the portion of the pic that's displayed in my OLE bound control?
>
>Any idea what I'm doing wrong? Any add-on's that might help with this?
>
>Thanks, I'm stuck and any help would be great!
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform