How to Display A Stored TIF Blob field in SQL Server

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default How to Display A Stored TIF Blob field in SQL Server

    Does anybody know how to display a TIF blob field in SQL Server? :confused;
    mofufus23 Guest

  2. Similar Questions and Discussions

    1. BLOB display in flash
      First, please do not post about using a file system for images rather than storing them in mysql as I know how to do this and I want to store the...
    2. Setting the value of an Informix v7.3 BLOB field using ADO, VFP and OLEDB
      Hi everyone, I'm trying to replace an Informix v7.3 BLOB field in an existing record with a .PDF file and it's giving me fits! I've adapted the...
    3. Problem reading a blob field in oracle (no, just converting it)
      Hi, I read a blob field from oracle using the recordser("FIELD").GetChunk....... I get the good value out of it. The problem is that this data...
    4. PHP + Firebird problem with blob field size
      Hello people, First: sorry my weak english. I´m brazilian. I have the fallow blob field in my database: CREATE DOMAIN DM_TEXT AS BLOB SUB_TYPE 1...
    5. How to Insert documents to a BLOB field
      Hi, I have an Access Front-End application and an Oracle Back-End for my tables. I have a BLOB field in one of the tables. I use Access form to...
  3. #2

    Default Re: How to Display A Stored TIF Blob field in SQL Server

    don't know that you can. don't you need some kind of plugin to display non-gif/jpeg/png images?

    PaulH Guest

  4. #3

    Default Re: How to Display A Stored TIF Blob field in SQL Server

    I'm not sure if this will work for TIF's, but it does work for JPEG's...

    This is how I do it... (In your CF Administrator, under your datasource, you
    need to make sure you select "Enable binary large object retrieval (BLOB)" and
    adjust your "Blob Buffer(bytes)" accordingly. By default the buffer size is
    64kb and images will be truncated if larger than 64kb.)

    Your page containing information and image that you want to display.
    *******************************************
    <cfquery>
    SELECT * FROM EMPLOYEES
    </cfquery>

    <img src="getPhoto.cfm?EmployeeID=#EmployeeID#" border="0" width="144"
    height="180">
    <!--- This calls your getPhoto.cfm page and passes in your EmployeeID --->
    <br>#EmployeeName#
    *******************************************

    In your getPhoto.cfm page...

    <!--- Need to have these two lines, you only want the image to be streamed
    back to your display page and not any other text. --->
    <cfsetting enablecfoutputonly="Yes">
    <cfsetting showdebugoutput="No">

    <cfquery name="getBlob">
    SELECT TOP 1 EmployeePhotoBlob, EmployeeName FROM Employees WHERE EmployeeID =
    #EmployeeID#
    </cfquery>

    <cfheader name="content-disposition"
    value="Inline;filename=#EmployeeName#.jpg">
    <cfcontent type="image/tiff; charset=iso-8859-1"> <!--- This tells the page to
    export in TIFF format. --->
    <cfoutput>#tostring(tobinary(getBlob.EmployeePhoto Blob))#</cfoutput>

    ************************************
    Hope this helps...

    James
    Sacramento, CA


    unleashed Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139