Check out TBlobField.SaveToFile method.
Good luck,
krf
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f0e0c$1...@newsgroups.borland.com...
> I am inserting jpeg images into a field that is an image data type in sql
> server.
> TBlobField
> I can insert and view the images stored in that field just fine but, one
> problem.
>
> I need to output the image file on a web page using cold fusion and I
think
> I need to set up some parameters that stores this image in some other way
> for cold fusion to write the file proporly.
>
> here is my cold fusion syntax
> <CFSET data64=toBase64(#cimage#)>
> <CFSET binaryData=toBinary(data64)>
> <CFFILE ACTION="WRITE" OUTPUT=#binaryData#
> FILE="c:\Inetpub\wwwroot\rodsracing\images\tempimage.jpg">
>
> can anyone please help me out.
>
> Ryan Schoolman - Programmer & Application Architect
> ry...@infinitejoy.com
>
> Infinity Software Solutions Inc.
> http://www.infinitejoy.com
>
> [w] 715.839.6855
> [c] 715.379.0878
> [h] 715.855.9003
>
>
>
TBlobField(Data.CategoriesTab.FieldByName(TImage(Sender).Hint)).LoadFromFile
(OpenDialog1.FileName);
CategoriesTab.Post;
"Kevin Frevert" <ke...@workdrinkingcoffee.com> wrote in message
news:3f0f...@newsgroups.borland.com...
This doesn't appear to base64-encode your image, while the CF code appears
to try to base64-decode it.
Cheers,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
Two options:
1) Use a Delphi component to encode it.
2) Change the CF code to not decode it. I don't know much about CF, but I
think the following replacement should do it:
<CFSET data64=toBase64(#cimage#)>
<CFSET binaryData=toBinary(data64)>
becomes:
<CFSET binaryData=toBinary(#cimage#)>
Cheers,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
Let me just make sure we have the process down here:
1) A Delphi application uses TBlobStream.LoadFromFile to load an image into
a BLOB field in a table.
2) A CF script loads the data in the BLOB field and saves it to disk.
Is that correct?
Cheers,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...
Does the data show up in the BLOB field after you load it via Delphi?
Cheers,
Ignacio
What sort of problem is the CF script having?
Cheers,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...
Does the webserver have write permission on that directory?
Cheers,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
So then this looks like a ColdFusion problem. My suggestion is that you go
to Macromedia's ColdFusion Database Access forum and ask there about pulling
the data from the BLOB field and dumping it to disk.
http://webforums.macromedia.com/coldfusion/categories.cfm?catid=6
Good Luck,
Ignacio
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...
"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...