BLOB field in SQL

  • 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

  • http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/reskit/sql2000/part3/c1161.asp

     

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • 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

  • 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