ASP Syntax

This should be an easy one. I am not on my desktop so I cant make sure this is the correct syntax of the following IF, can someone please confirm it is so I can pass it to a collegue ?

Current code is:

if Session("QFBlobid") = "" OR rs_Blob("Blobdata") = "" then

REGION A

	If not rs_FormsBlb.EOF then

REGION B 

	else
		Response.Write("Error EOF")
	end if
end if

%>

Open in new window


That code works well, but I need to add to the first IF. I want to run REGIONS IF that blob session doesn't exist, but also if a field of the recordset "rs_blob" is = ""  OR is NULL

This is how I entered the code, unfortunately I can't confirm at this time, can someone tell me if it looks correct ?

if Session("QFBlobid") = "" OR rs_Blob("Blobdata") = "" then  OR OR rs_Blob("Blobdata") is NULL

REGION A
... etc

Open in new window

LVL 1
AleksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
I guess you need this??

if Session("QFBlobid") = "" OR "" & rs_Blob("Blobdata") = "" then
'....

Open in new window

0
AleksAuthor Commented:
With that code is there no need to compare with a null ?
0
Ryan ChongCommented:
as it was using:

"" & rs_Blob("Blobdata")

it will cover up the comparison with null value.

meaning to say, even rs_Blob("Blobdata") contains null value, it will be replaced with "" as we using:

"" & rs_Blob("Blobdata")
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

AleksAuthor Commented:
I apologize for the wait. I added:

if Session("QFBlobid") = "" OR "" & rs_Blob("Blobdata") = "" then

Open in new window


I get this error on that line:


error '80020009'
/bluedot/Intranet/Cases/forms_bridgecall.asp, line 1061


line 1061 is:   if Session("QFBlobid") = "" OR "" & rs_Blob("Blobdata") = "" then

Note: Blobdata is a text field
0
AleksAuthor Commented:
This seems to have worked:

if Session("QFBlobid") = "" OR isNull (rs_Blob("Blobdata"))  then
0
Ryan ChongCommented:
ok, coool. so do you still need further assistance here?
0
AleksAuthor Commented:
I want to make sure this will work not only if the field is NULL but also if it is 'empty'  meaning  ""
0
Ryan ChongCommented:
I want to make sure this will work not only if the field is NULL but also if it is 'empty'  meaning  ""
what if we try:
if Session("QFBlobid") = "" OR isNull (rs_Blob("Blobdata")) or rs_Blob("Blobdata") = "" then

Open in new window

?
0
AleksAuthor Commented:
I tried but I get the error I posted before:

error '80020009'
0
Ryan ChongCommented:
if you do a:
response.write("|" & rs_Blob("Blobdata") & "|")

Open in new window

what do you get?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AleksAuthor Commented:
Actually this seems to have worked on every scenario we tried:

if Session("QFBlobid") = "" OR isNull (rs_Blob("Blobdata"))  then
0
AleksAuthor Commented:
Thanks for the follow up.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.