If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > handling sql binary value

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-04, 12:41
softie() softie() is offline
Registered User
 
Join Date: Sep 2004
Posts: 21
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
Reply With Quote
  #2 (permalink)  
Old 10-14-04, 20:50
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
wouldn't you just use isNull(myValue) in the same way you would for other null values??
Reply With Quote
  #3 (permalink)  
Old 10-15-04, 09:55
softie() softie() is offline
Registered User
 
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

Reply With Quote
  #4 (permalink)  
Old 10-16-04, 19:37
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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 19:42.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On