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 > Oracle, ASP & NULLs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-04, 14:01
RhythmAddict RhythmAddict is offline
Registered User
 
Join Date: Dec 2003
Posts: 148
Question Oracle, ASP & NULLs

Greetings.
Im in the process of a SQL server to Oracle migration. I moved over the app and the db's, but there is a condtional check to see if a field is null. Though this code worked fine on SQL Server, it does not on Oracle. I have a feeling it is because of the way Oracle treats Nulls. Check it out...

Code:
if ("Comment") = "" then
		 	Response.Write "<td class=smShadeLite>&nbsp;" & RS("prepared") & "</td>" 
		  else
			Response.Write "<td>&nbsp;<A HREF='javascript:void(null)' ONCLICK='popup(""" & Comment & """);'>" & RS("comment") &"</a></td>"
		  end if
Basically the if ("Comment") = "" is problematic. I have tried playing with the quotes, as well as what is in the quotes. I believe that in Oracle a NULL field must actually say NULL (is that correct?) Basically, the problem is the fields do not say null, they are simply empty. Is there a way around this?
Thank you
Reply With Quote
  #2 (permalink)  
Old 06-30-04, 15:54
RhythmAddict RhythmAddict is offline
Registered User
 
Join Date: Dec 2003
Posts: 148
Smile solved..

thanks to the IsNull function in asp.
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