is a record empty, then .......

L

Leentje®

hi,

i'm trying to determine if a record is empty
and when it's not, it has to show that record

to test, I put three X's in the code

the content of rs("opmerking") isn't shown
but the three X's are there

Does someone know why ?
Here is my code:

<%
While not rs.EOF
If not rs.EOF then
%>
<tr>
<td><% If Not Len(rs("opmerking")) = 0 Then %>
<br><%=rs("uitgevoerd")%>XXX
<% End If %></td>
</tr>
<%
rs.MoveNext
End If
Wend
%>

I've all ready tried this:

<% If Not Len(rs("opmerking")) = "0" Then %>

without any result

and I've all ready tried this:

<% If not(isNull(rs("opmerking"))) Then %>
<br><%=rs("opmerking")%>XXX
<% End If %>

the three X's are there
but the content of rs("opmerking") isn't there

who can help me?

thanks
Leentje
 
E

Evertjan.

Leentje® wrote on 17 jun 2007 in microsoft.public.inetserver.asp.general:
i'm trying to determine if a record is empty
and when it's not, it has to show that record
<% If Not Len(rs("opmerking")) = 0 Then %>

Good idea, why not try:

<% If Not Len(rs("opmerking")) = "0" Then %>

The above is illogical, since len() should return a number.
<% If not(isNull(rs("opmerking"))) Then %>

You were asking for empty, noot for a null value.

Empty of a string field value would be "" or Null.

Are you sure the field is a string?

Do you allow null values of that field?

What database engine?

We need meer informatie, Leentje, to learn Lotje to walk.
 
L

Leentje®

thanks
don't ask me how
but it works now



Evertjan. said:
Leentje® wrote on 17 jun 2007 in microsoft.public.inetserver.asp.general:


Good idea, why not try:



The above is illogical, since len() should return a number.


You were asking for empty, noot for a null value.

Empty of a string field value would be "" or Null.

Are you sure the field is a string?

Do you allow null values of that field?

What database engine?

We need meer informatie, Leentje, to learn Lotje to walk.
 
E

Evertjan.

Leentje® wrote on 17 jun 2007 in
microsoft.public.inetserver.asp.general:
[Please do not toppost on usenet, corrected]
thanks
don't ask me how
but it works now

As this is a forum and not a helpdesk,
it would be nice and polite to have
1 my above questions answered
and
2 to know what solution you chose.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top