| Author |
is a record empty, then .......
|
|
| LeentjeŽ 2007-06-17, 7:55 am |
|
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
| |
| Evertjan. 2007-06-17, 6:56 pm |
| 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 Len("" & rs("opmerking")) > 0 Then %>
> <% 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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
| |
| LeentjeŽ 2007-06-17, 6:56 pm |
|
thanks
don't ask me how
but it works now
"Evertjan." <exjxw.hannivoort@interxnl.net> schreef in bericht
news:Xns9952B39CAF5E4eejj99@194.109.133.242...
> LeentjeŽ wrote on 17 jun 2007 in microsoft.public.inetserver.asp.general:
>
>
> Good idea, why not try:
>
> <% If Len("" & rs("opmerking")) > 0 Then %>
>
>
>
> 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.
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
| |
| Evertjan. 2007-06-18, 7:55 am |
| LeentjeŽ wrote on 17 jun 2007 in
microsoft.public.inetserver.asp.general:
> "Evertjan." <exjxw.hannivoort@interxnl.net> schreef in bericht
> news:Xns9952B39CAF5E4eejj99@194.109.133.242...
[Please do not toppost on usenet, corrected]
[color=darkred]
> 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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
| |
|
|
|
|
|
|
|
|
|
|
|
|