is this sentence ...

# Thread: is this sentence ...

1. Senior Member
Join Date
Dec 1969
Posts
154

## is this sentence ...

workable??<BR><BR>Response.Write "StrComp(rs("Avail"),"")"<BR>

2. Junior Member
Join Date
Dec 1969
Posts
18

## RE: is this sentence ...

Response.Write "StrComp(rs("Avail"),"")"<BR>No that&#039;s not workable if StrComp is using the var, take off the outer "&#039;s<BR>Response.Write StrComp(rs("Avail"),"")

3. Senior Member
Join Date
Dec 1969
Posts
2,334

## are you trying to check if

rs("Avail") is NULL.<BR><BR>If yes then you can do that by simply doing,<BR><BR>If rs("Avail") = "" Then<BR>CODE<BR>END If<BR><BR>or more full proof. Check for the length.<BR><BR>If len(trim(rs("Avail"))) = 0 Then<BR>CODE<BR>End If<BR><BR>But to answer your original question,<BR><BR>Response.Write StrComp(rs("Avail"),"")<BR> <BR><BR>

4. Senior Member
Join Date
Dec 1969
Posts
154

## ok...

but why the result is blank??

5. Junior Member
Join Date
Dec 1969
Posts
18

## RE: ok...

It&#039;s probably not retrieving the correct information from the record set. Refer to roy_tech&#039;s reply about it being NULL.

6. Senior Member
Join Date
Dec 1969
Posts
154

## i use your method...

which is :<BR><BR>If len(trim(rs("Avail"))) = 0 Then <BR> Response.Write StrComp(rs("Avail"),"")<BR> Else<BR> Response.Write "<BR>No" <BR> End If<BR><BR><BR>and the result is :<BR>no

7. Junior Member
Join Date
Dec 1969
Posts
18

## RE: i use your method...

What is the value of rs("Avail"), without it being trimed and crap?

8. Senior Member
Join Date
Dec 1969
Posts
2,334

## it is writing NO because

rs("Avail") is NULL. It doesn&#039;t have a value.<BR><BR>But you didn&#039;t use it properly. The first line in the code itself checks if it is NULL or not. No need to use STRCOMP then.<BR><BR>If len(trim(rs("Avail"))) = 0 Then <BR> Response.Write "The value is null"<BR>Else<BR> Response.Write "The value is not null" <BR>End If<BR>

9. Senior Member
Join Date
Dec 1969
Posts
154

## it's

blank...

10. Senior Member
Join Date
Dec 1969
Posts
154

## the result is :

The value is not null

#### Posting Permissions

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