Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 BLOBS from SQL into HTML

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-03-13 : 06:56:04
I had some HTML mails going out being taken care of by xp_smtp_sendmail. It was all text variables in the hypertext. Very neat.

Now I need to swap out some of these for BLOBS, which I think might be .bmp - not sure. My contatenation with the rest of the HTML string is, obviously:

'xxxxxxxxxxx'+@variable+'xxxxxxxxxxxxxxxx'

but if I replace the BLOBname in there I get:

Server: Msg 403, Level 16, State 1, Line 129
Invalid operator for data type. Operator equals add, type equals nvarchar.

Tried a few random ideas such as && or ||

Single & or | gives:

Server: Msg 403, Level 16, State 1, Line 129
Invalid operator for data type. Operator equals boolean AND, type equals nvarchar.

Do I need a different kind of HTML tag in there?

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-03-13 : 07:10:02
When I ask about HTML tags.... That is irrelevant!

This text is all essentially in a SELECT statement. It picks up on the variable which is a BLOB / <binary> inside that text, which I think can be concatenated out of the HTML text.

What I need is to just SELECT the BLOB and see if it can read it
Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2008-03-13 : 07:18:02
OK

So when I do the simple SELECT I get the neverending text field, which I've seen before... everyone's seen this. I can put it in Crystal Reports - no messing about - it displays it for you.

I thought HTML would be handy - copes with any format. I have seen sp_makewebtask come out with 'broken picture icon'. But no more.

Right here what I've got is not the text out, or the pic. It's in limbo between with a lovely error. I've read that Java or C# is required to do this job.

Anyone got a handle on this?
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-03-13 : 08:25:05
is this any use to you?

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=42929&SearchTerms=mail,select,image
Go to Top of Page
   

- Advertisement -