07$: Writing image files from file path to database
Alan Froehling
alfmd at mvn.net
Tue Jan 19 11:57:19 EST 2010
JPEB?
Shouldn't that be JPEG?
Al F.
On Jan 19, 2010, at 10:20 AM, Michael Mantkowski wrote:
> Hi Caroline,
>
> I use...
>
> Calculate fvPicture as getpicfromimage(fvPictPath,1)
>
> fvPicture being a Picture Field variable.
>
> And of course the picture can only be one of the file tyrpes that
> Omnis
> understands. JPEB, BMP, PICT
>
> Michael
>
> *********************************************************************
> Michael Mantkowski
> ClienTrax Software
> 1-800-416-2815
> *********************************************************************
> -----Original Message-----
> From: omnisdev-en-bounces at lists.omnis-dev.com
> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Dr
> Caroline
> Wilkins
> Sent: Tuesday, January 19, 2010 11:05 AM
> To: OmnisDev List - English
> Subject: 07$: Writing image files from file path to database
>
> Dear Listers,
>
> Is it possible, in Omnis 7.3.7.1 to read an image file from disk
> and put
> it into a picture field in the database? Could someone help me with a
> code snippet please?
>
> I have something I thought would work, but it isn't - LVIMAGE
> remains empty.
>
> Parameter PVID (Long integer)
> Parameter PVFILEPATH (Character 10000000)
> Local variable LVIMAGEREF (Long integer)
> Local variable LVIMAGE (Picture)
> Local variable LVRETURNVALUE (Long integer)
>
> OpenFile (PVFILEPATH,LVIMAGEREF)
> ReadFile (LVIMAGEREF,LVIMAGE)
> CloseFile
>
> Set main file {FMYFILE}
> Find on MYFILESEQ (Exact match) {PVID}
> Calculate PICFIELD as LVIMAGE
> Update files
> Set read-only files {FMYFILE}
>
>
> I also tried this without success:
>
> Local variable LVIMAGEBIN (Binary)
> ReadBinFile (PVFILEPATH,LVIMAGEBIN) with return value LVRETURNVALUE
>
> Have tried testing with both BMPs and JPGs. Can anyone see where I am
> going wrong and point me in the right direction please?
>
> Many thanks
>
> Caroline
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
More information about the omnisdev-en
mailing list