Bill,

Or you can use the UniVerse ENCODE() function to turn the binary
photograph data into a Base64 "MV-safe" form on input for storing in a
regular UniVerse file, and back into the original form for output.
And IIRC, the un-ENCODEing process arbitrarily inserts CHAR(10) every
76(?) characters. That was early in 10.0, things may have changed.
Testing is definitely required!

The Base64 ENCODEd string is about one-third larger than the original -
three bytes of input are transformed into four bytes.

HTH

Regards


Mike


-----Original Message-----
From: [EMAIL PROTECTED] On Behalf Of Scott Ballinger
Sent: Thursday, 9 October 2008 7:34 a.m.
To: [email protected]
Subject: Re: [U2] [UV] Saving Photos

Bill,

I do this for JPEGs, TIFs,  PDFs, etc, by just storing the filename in
the
database. The actual BLOB file remains stored in the host O/S
filesystem.
You may need to work out your own simple hierarchial directory structure
to
limit the number of files per sub-directory; in my case I typically
assign
the BLOB file a sequential name, e.g. 1234999.pdf, then store a maximum
of
1000 files per directory as .../1234/1234999.pdf.  A standardized
subroutine
calculates and returns the path to the file based on it's name.

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

On Wed, Oct 8, 2008 at 11:01 AM, Brutzman, Bill
<[EMAIL PROTECTED]>wrote:

> Is there a way to save a file with a photograph in a U2 database?
>
> I seem to remember the idea of a BLOB (Binary Large Object) data type
in
> say MS-SQL.
>
> Suggestions would be appreciated.
>
> --Bill
> -------
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or 
distribute this message or the information in it.

If you have received this message in error, please Email or telephone
the sender immediately.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to