Display Image Fields From MSSQL.
Franck at sopac.org
Tue Mar 6 18:39:51 EST 2001
I don't get any error message.... Can you be more specific? I'm on php3.
Well, If I use a database to store files, it means this is where I want to
store file instead of the hard drive. So I avoid to copy it from the
database to the hardrive of the web server as I cannot control if the record
got updated or not (I could use timestamps and store them on file)...
But so far in my case, the whole process does not impact the performance of
my web server compared to the bandwidth allocated to the web server...
Network and Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
E-mail: franck at sopac.org <mailto:franck at sopac.org>
Web site: http://www.sopac.org/
<http://www.sopac.org/> Support FMaps: http://fmaps.sourceforge.net/
This e-mail is intended for its addresses only. Do not forward this e-mail
without approval. The views expressed in this e-mail may not be necessarily
the views of SOPAC.
From: Leo Kwan [mailto:leo_kwan at hotmail.com]
Sent: Tuesday, 6 March 2001 9:25
To: TDS Development Group
Subject: [freetds] Re: Display Image Fields From MSSQL.
Oh the other hand, would you mind please check your httpd error log files.
I've got a error : Attempting to convert unknown source type 34. Do you
know what had happened??
Moreover, is it a good way to get those image from database every time it
needs? I believe that write them to a file and retrive data from database
one time is enough.
> Here is the php code that I use...
> Note that this code removes the OLE container of the object. MS-Access
> the image in an ole container by default which get then stored in the
> field... This php code looks for the beginning of the JPEG data by looking
> for the string JFIF. The beginning is then a few characters before...
> I hope it helps. It works for me... cf
> Header("Content-type: image/jpeg");
> $conn = sybase_pconnect("SERVER","username","password");
> if (@$snapid==0)
> $result = sybase_query("Snap_Image2vchar ".$snapid);
> for ($i = 0 ; $i < $nbrows; $i++)
> $par = sybase_fetch_object($result);
> if ($i==0)
> // Needs to remove the OLE header if any...
> echo (substr($par->Snap,$pos-6));
> } else
> echo ($par->Snap);
You are currently subscribed to freetds as: [franck at sopac.org.fj]
To unsubscribe, forward this message to
More information about the FreeTDS