Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to read an image from a GENERAL field
Message
From
11/12/2006 05:27:46
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/12/2006 05:22:01
Prashant Dongare
Micropro Software Solutions
Nagpur, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01176470
Message ID:
01176471
Views:
16
>Hey,
>I want to store the snaps(in JPEG Format) of employee to the database.
>I use a picture control to show this image on the form.
>While saving the snaps I can directly save it to the database using...
>
>APPEND GENERAL em_photo FROM z:\data\images\ku0001.jpg
>
>But while retriving the same, I am not able to do the same.
>Please suggest me a way out.
>Thanks in advance.

This has been told maybe a thousand times. Do not use general fields. If you 'have to' store the images in a table than prefer memo fileds (or BLOB in VFP9).
Store the path and filename instead.
If you don't have access to sources anymore you can do soething like this:

copy next 1 imagefield to tempCursor
lowlevel open the tempcursor's fpt
get data starting at offset 599 (599 works for BMP but not the same for all file types).

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform