is a record empty, then .......
is a record empty, then .......
am 17.06.2007 12:41:07 von help.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
%>
<% If Not Len(rs("opmerking")) = 0 Then %>
<%=rs("uitgevoerd")%>XXX
<% End If %> |
<%
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 %>
<%=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
Re: is a record empty, then .......
am 17.06.2007 17:39:22 von exjxw.hannivoort
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)
Re: is a record empty, then .......
am 17.06.2007 23:06:11 von help.leentje
thanks
don't ask me how
but it works now
"Evertjan." schreef in bericht
news:Xns9952B39CAF5E4eejj99@194.109.133.242...
> 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)
Re: is a record empty, then .......
am 18.06.2007 11:09:43 von exjxw.hannivoort
Leentje® wrote on 17 jun 2007 in
microsoft.public.inetserver.asp.general:
> "Evertjan." schreef in bericht
> news:Xns9952B39CAF5E4eejj99@194.109.133.242...
>> 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.
[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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)