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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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 ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I guess you need this??

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

Open in new window

AleksAuthor Commented:
With that code is there no need to compare with a null ?
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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")
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

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
AleksAuthor Commented:
This seems to have worked:

if Session("QFBlobid") = "" OR isNull (rs_Blob("Blobdata"))  then
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
ok, coool. so do you still need further assistance here?
AleksAuthor Commented:
I want to make sure this will work not only if the field is NULL but also if it is 'empty'  meaning  ""
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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

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

error '80020009'
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
if you do a:
response.write("|" & rs_Blob("Blobdata") & "|")

Open in new window

what do you get?

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
AleksAuthor Commented:
Thanks for the follow up.
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.