Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Posts
    21

    Unanswered: handling sql binary value

    how do you test for null or empty binary values received from an sql table within your asp code? or rather, i'm assuming that there is such a thing as a null binary value, so what is the empty "" binary value?

    response.BinaryWrite(...) always fails in such cases

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    wouldn't you just use isNull(myValue) in the same way you would for other null values??

  3. #3
    Join Date
    Sep 2004
    Posts
    21
    yes, i've tried that...

    if not isNull(myValue) thenm
    response.binaryWrite(myValue) //unhandled data type error
    end if


  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    I haven't played with binary data in databases for a long time but wouldn't you have to use GetChunk to get the binary data??

    http://msdn.microsoft.com/library/de...thod_oledb.asp

    And you could use the ActualSize property to determine if the field was empty or not.
    Last edited by rokslide; 10-16-04 at 20:42.

Posting Permissions

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