Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TBlobFields

0 views
Skip to first unread message

Kevin Frevert

unread,
Jul 11, 2003, 3:29:52 PM7/11/03
to
Ryan,

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
>
>
>

Ryan Schoolman

unread,
Jul 11, 2003, 3:19:35 PM7/11/03
to

Ryan Schoolman

unread,
Jul 11, 2003, 3:38:20 PM7/11/03
to
Kevin,
maybe this is give you a better understanding of what I'm trying to do
CategoriesTab.Edit;

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...

Ignacio Vazquez

unread,
Jul 11, 2003, 3:42:13 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f...@newsgroups.borland.com...

> maybe this is give you a better understanding of what I'm trying to do
> CategoriesTab.Edit;
>
>
TBlobField(Data.CategoriesTab.FieldByName(TImage(Sender).Hint)).LoadFromFile
> (OpenDialog1.FileName);
> CategoriesTab.Post;

This doesn't appear to base64-encode your image, while the CF code appears
to try to base64-decode it.

Cheers,
Ignacio


Ryan Schoolman

unread,
Jul 11, 2003, 3:47:30 PM7/11/03
to
Point me into the right direction then.

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message

Ignacio Vazquez

unread,
Jul 11, 2003, 3:54:29 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f...@newsgroups.borland.com...
> Point me into the right direction then.

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

Ryan Schoolman

unread,
Jul 11, 2003, 4:07:34 PM7/11/03
to
still not working.


"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message

Ignacio Vazquez

unread,
Jul 11, 2003, 4:17:14 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f194b$1...@newsgroups.borland.com...
> still not working.

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


Ryan Schoolman

unread,
Jul 11, 2003, 4:18:56 PM7/11/03
to
True


"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...

Ryan Schoolman

unread,
Jul 11, 2003, 4:19:29 PM7/11/03
to
True

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...

Ignacio Vazquez

unread,
Jul 11, 2003, 4:31:26 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f1c16$1...@newsgroups.borland.com...
> True

Does the data show up in the BLOB field after you load it via Delphi?

Cheers,
Ignacio


Ignacio Vazquez

unread,
Jul 11, 2003, 4:56:57 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f241b$1...@newsgroups.borland.com...
> true

What sort of problem is the CF script having?

Cheers,
Ignacio


Ryan Schoolman

unread,
Jul 11, 2003, 4:53:42 PM7/11/03
to
true

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...

Ignacio Vazquez

unread,
Jul 11, 2003, 4:59:30 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f...@newsgroups.borland.com...
> the image cannot be written to the file system properly.

Does the webserver have write permission on that directory?

Cheers,
Ignacio


Ryan Schoolman

unread,
Jul 11, 2003, 4:58:58 PM7/11/03
to
yeppers

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message

Ignacio Vazquez

unread,
Jul 11, 2003, 5:04:45 PM7/11/03
to
"Ryan Schoolman" <ry...@infinitejoy.com> wrote in message
news:3f0f2557$1...@newsgroups.borland.com...
> yeppers

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


Ryan Schoolman

unread,
Jul 11, 2003, 5:06:28 PM7/11/03
to
thanks for the help

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...

Ryan Schoolman

unread,
Jul 11, 2003, 4:57:06 PM7/11/03
to
the image cannot be written to the file system properly.

"Ignacio Vazquez" <ivazquezATorioncommunications.com> wrote in message
news:3f0f...@newsgroups.borland.com...

0 new messages