473,327 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Weird ASP Error

Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger
Jul 19 '05 #1
11 1430
What does this do?

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
Else
"Hmm empty value. Must be something else going on here."
End IF
%>

And do you have an On Error Resume Next in your code? If so, be sure you
comment it out while debugging.

Ray at work

"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger

Jul 19 '05 #2
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.


I suspect it has a NULL value? Perhaps try this instead:

<% If Len(rslist.Fields.Item("M_bio").Value) > 0 Then
Response.Write("Testing")
End If
%>

Regards,
Peter Foti
Jul 19 '05 #3
On 15 Mar 2004 09:57:06 -0800, u8******@cc.nctu.edu.tw (HelLind)
wrote:
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Valu e)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.


If it had a null value this would be expected. :)

Or I guess if it were a string of spaces. Have you tried debugging by
using Response.Writes in your IF/THEN segement? Something like:

<%
Response.Write rslist.Fields.Item("M_bio").Value & "<br>"
If rslist.Fields.Item("M_bio").Value <> "" then
Response.Write "Value is not empty<br>"
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF
%>
Jul 19 '05 #4
What does this produce:

IF isNull(rslist.Fields.Item("M_bio").Value) THEN
response.write "Value is Null"
ELSE
response.write "Value is not Null
END IF

The field may contain Null which is not equivalent to ""
-----Original Message-----
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google. com...
Hello people,

I am having a weird error and don't know what term to search in google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item ("M_bio").Value%>, it displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the reason.


I suspect it has a NULL value? Perhaps try this instead:

<% If Len(rslist.Fields.Item("M_bio").Value) > 0 Then
Response.Write("Testing")
End If
%>

Regards,
Peter Foti
.

Jul 19 '05 #5
"Jeff Cochran" wrote:
It displays nothing, the page shows no error. Does anyone
know the reason.


If it had a null value this would be expected. :)

Or I guess if it were a string of spaces...


For that matter, if you are viewing the output in a browser, the contents
could be viewable in the source but not displayed. I wonder how this turns
out:

Response.Write(Server.HTMLEncode(rslist.Fields.Ite m("M_bio").Value))
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in message news:<e5**************@TK2MSFTNGP09.phx.gbl>...
What does this do?

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
Else
"Hmm empty value. Must be something else going on here."
End IF
%>

And do you have an On Error Resume Next in your code? If so, be sure you
comment it out while debugging.

There is no ON ERROR RESUME NEXT. I am using Ultradev code.

If i add ' Else Response.Write "hello" ' it doesnt' go to else. But If
i add 'response.write "hello' under the If statement, it does.

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
response.write "hello"
Else
'"Hmm empty value. Must be something else going on here."
response.write "test"
End IF
%>

It display "Hello" only. I F5 the page, even restarted the PC.

Thanks. :-)

Ray at work

"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger

Jul 19 '05 #7
Perhaps you value is a space, which would not equal "" then.

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write "DATAHERE" & (rslist.Fields.Item("M_Bio").Value) &
"DATATHERE"
Else
'"Hmm empty value. Must be something else going on here."
response.write "test"
End IF
%>

What does that return?
DATAHEREDATATHERE or DATAHERE DATATHERE. (Look in view-source for real
value.)

Ray at work

"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a*************************@posting.google.co m...
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in

message news:<e5**************@TK2MSFTNGP09.phx.gbl>...
What does this do?

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
Else
"Hmm empty value. Must be something else going on here."
End IF
%>

And do you have an On Error Resume Next in your code? If so, be sure you comment it out while debugging.

There is no ON ERROR RESUME NEXT. I am using Ultradev code.

If i add ' Else Response.Write "hello" ' it doesnt' go to else. But If
i add 'response.write "hello' under the If statement, it does.

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
response.write "hello"
Else
'"Hmm empty value. Must be something else going on here."
response.write "test"
End IF
%>

It display "Hello" only. I F5 the page, even restarted the PC.

Thanks. :-)

Ray at work

"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger

Jul 19 '05 #8
"Peter Foti" <pe***@Idontwantnostinkingemailfromyou.com> wrote in message news:<10*************@corp.supernews.com>...
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.


I suspect it has a NULL value? Perhaps try this instead:

<% If Len(rslist.Fields.Item("M_bio").Value) > 0 Then
Response.Write("Testing")
End If
%>

Regards,
Peter Foti


Hi peter,

There seems nothing wrong with the IF statement, it goes inside the IF
statement. So the len > 0 is passed.

It does display Response.write "testing" but not
response.Write(rslist.Fields.Item("M_Bio").Value)

Below is the code:

<% If len(rslist.Fields.Item("M_bio").Value) > 0 then
response.write "testing"
response.Write(rslist.Fields.Item("M_Bio").Value)
else
response.write "hello"
End IF %>

It shows "testing" only but not the "m_bio" data.

I dont' think anything wrong with the "M_BIO" field becoz direct

response.Write(rslist.Fields.Item("M_Bio").Value) works.
Basically my code is MM Ultradev's listdetail code.

Thanks
Jul 19 '05 #9
Try putting the value in a temp variable before the if statement. There is
an old old problem with memo fields that is resolved that way. Also, if the
value is NULL that is not the same as an empty string.
strBio = rslist.Fields.Item("M_bio").Value
If isnull(strBio) then strBio = ""
If strBio <> "" then
response.Write(strBio )
Else
"Hmm empty value. Must be something else going on here."
End IF
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a*************************@posting.google.co m...
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in

message news:<e5**************@TK2MSFTNGP09.phx.gbl>...
What does this do?

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
Else
"Hmm empty value. Must be something else going on here."
End IF
%>

And do you have an On Error Resume Next in your code? If so, be sure you comment it out while debugging.

There is no ON ERROR RESUME NEXT. I am using Ultradev code.

If i add ' Else Response.Write "hello" ' it doesnt' go to else. But If
i add 'response.write "hello' under the If statement, it does.

<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
response.write "hello"
Else
'"Hmm empty value. Must be something else going on here."
response.write "test"
End IF
%>

It display "Hello" only. I F5 the page, even restarted the PC.

Thanks. :-)

Ray at work

"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
Hello people,

I am having a weird error and don't know what term to search in
google. Sorry to bother.

There is data in my field "M_BIO"

When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.

When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>

It displays 'testing', no probs.
But when I run this code:

<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>

It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger

Jul 19 '05 #10
"Dave Anderson" <GT**********@spammotel.com> wrote in message news:<eO**************@TK2MSFTNGP09.phx.gbl>...
"Jeff Cochran" wrote:
It displays nothing, the page shows no error. Does anyone
know the reason.


If it had a null value this would be expected. :)

Or I guess if it were a string of spaces...


For that matter, if you are viewing the output in a browser, the contents
could be viewable in the source but not displayed. I wonder how this turns
out:

Response.Write(Server.HTMLEncode(rslist.Fields.Ite m("M_bio").Value))


Sorry for all your troubles.

This is such a simple code and there is nothing wrong with it. I
uploaded to my webhost and it is working fine.

The weird thing is it still doesn't work in my PC's IIS. NO viruses,
winxp updated new. Is there any setting (buffer) to set ?

thanks
Jul 19 '05 #11


HI Roger ui think that the problem is in your file not in your page i
used this code:
<%if rstExcel.Fields.Item(I).Value <>"" then %>
<a href="servicios_diagnostico.asp?ciudad=<%response. write
rstExcel.Fields.Item(I).Value%>" >
<td class="contbb" onmouseover="className='contbc'"
onmouseout="className='contbb'" valign="middle">
<img height=15 src="graficos/pfeil.gif" width=10><% Response.Write
rstExcel.Fields.Item(I).Value %>
</td>
</a>
<%end if%>
and i didn't have problems.
If you wnat help why don't you post your file headers.
See u.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: redneck_kiwi | last post by:
Hi all: I have a really weird problem. I am developing a customer catalog system for my company and as such have delved into sessions for authentication and access levels. So far, I have managed...
5
by: NanQuan | last post by:
I'm hoping someone can help me solve this error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer to solve stuff myself but this is...
1
by: amit | last post by:
I am trying to compile the sample program genwin.sqc, using nsqlprep which is used to precompile embedded sql in C. I am getting weird errors and that is because windows.h is included in the...
2
by: Kathy Houtami | last post by:
Hi there I've been encountered with weird compile error using Access 97. The error message is "Member or data member is not found" and it highlighted a line of code that has not be changed and...
6
by: gh0st54 | last post by:
Hi I have a weird javascript error that only happens on my live server when i open the page http://www.imrated.co.uk/reg.aspx i get the error 'Problems with this page ... blablabla Line : 3...
0
by: Alan Silver | last post by:
Hello, I have two weird problems here. I have a master page file that works absolutely fine. When I load it up in VWD, I get a couple of weird (to me) errors. First, I get the error...
0
by: P Pulkkinen | last post by:
Dear all, sorry, i know this code is far little too long to debug here, but there is really annoying logical error. If someone debugs this, I really offer warm virtual handshake. What this...
7
by: dtschoepe | last post by:
Hi, I am working on a project for school and I am trying to get my head around something weird. I have a function setup which is used to get an input from stdin and a piece of memory is created...
6
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help with a combo box and this same code works on my first tab with a combo box. The error or problem i have is this code causes an index out of range error when i run it on my second combo...
4
by: d3vkit | last post by:
I recently had a friend pass along some web work for me; a simple update. I for some reason decided I would do some overhauling of the page (he had been doing straight html and I figured some php...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.