February 23, 2004 at 6:06 am
Hi all, dont know if this is the right directory for this question. Apologies if not.
My Challenge.
I am a Crystal reports developer and I need images in reports depending on certain data. e.g. company logos depending on company name.
I need to store these images in a SQL database. How should I do this?
I have tried with an image field and use the script :
INSERT INTO BLOBIMAGE (Blob)
VALUES( 'E:\Data\Enviroserv\Logos\Hazmat.jpg')
To populate the field. The field is a type image. When i query the table with query analyser, there definetly is data in it. It returns a hex string, but crystal doesnt pick anything up. Although it knows it is an image field.
I think its the way I am storing the image as in Excel and VB it doesnt show either.
How should I be storing it? What if I use a reference in the table to the logos location? How would I do this?
Unfortunately my SQL skills are not great and I will need detaled instructions on how to do it.
Thanks so much.
Ian
February 23, 2004 at 6:09 am
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
February 24, 2004 at 5:32 am
Which version of Crystal are you using?? If you can get version 9 Crystal added a repository that allows you to drag and drop images into a special database that all your reports can access.
If you don't have 9, convince your boss it's worth the investment.
By the way, what you are seeing in your blob is a binary representation of the string E:\Data\Enviroserv\Logos\Hazmat.jpg
February 24, 2004 at 7:26 am
Hi, thanks for the info.
Unfortunately we cant upgrade at this moment. I am using crystal 8.
If what you say about the BLOB field storing the location address, why doesnt it show any thing. I have the image on my machine in that folder and on the server in that folder.
Northwind has a table called employees with images in it. When i try put this table into my report to test it, i get the following error:
"Unicode data in a Unicode-only or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier"
Maybe its related.
Thanks for your help
Ian
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply