Ask a Question related to ASP Database, Design and Development.
-
Mike #1
How come if you use a rs.fields(0).value it sometimes is empty?
Why does this happen:
the code below works fine as-is. If I take out tempValue =
rs.fields(i).value and put rs.fields(i).value everywhere instead, some
fields end up empty!! Why does this happen? I'm using Access.
while not rs.eof
for i = 0 to rs.fields.count - 1
miniId = rs.fields(0).value
statId = i + 1
tempValue = rs.fields(i).value
if (not tempValue = "") And (not isNull(tempValue)) Then
response.write(tempValue & "<br>")
statValue = replace(tempValue, "'", "''")
else
response.write(tempValue & "<br>")
statValue = "--"
end if
Mike Guest
-
Check Empty form fields
Hi all, Is there a simple extension that checks so that a form filed is not empty before submitting? -
Empty Fields
I am new to CF. I am trying to figure out how to remove blank lines from my output when there are no values for a particular field in the database.... -
Dealing with empty fields from database query
Using the procedure in the Dreamweaver manual for building search/result pages I'm trying to retrieve data from MYSQL database and put it into a... -
IPostBackDataHandler.LoadPostData does not fire on empty postDataKey form fields
After creating a custom MultiSelectBox that has a checkbox list, i noticed that the control wasn't updating it's selected listitems when no... -
Omitting form fields if empty
I have a form I'm putting together. The processing will be on a PHP script that will take all the field names and print them out on the email it... -
Bob Barrows [MVP] #2
Re: How come if you use a rs.fields(0).value it sometimes is empty?
Mike wrote:
Huh? I don't understand what you are saying. Show us the modification you> Why does this happen:
>
> the code below works fine as-is. If I take out tempValue =
> rs.fields(i).value and put rs.fields(i).value everywhere instead, some
> fields end up empty!! Why does this happen? I'm using Access.
are making (and explain the problem you are trying to solve that prompted
you to make the modification)
-->
>
> while not rs.eof
> for i = 0 to rs.fields.count - 1
> miniId = rs.fields(0).value
> statId = i + 1
> tempValue = rs.fields(i).value
> if (not tempValue = "") And (not isNull(tempValue)) Then
> response.write(tempValue & "<br>")
> statValue = replace(tempValue, "'", "''")
> else
> response.write(tempValue & "<br>")
> statValue = "--"
> end if
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest
-
Aaron [SQL Server MVP] #3
Re: How come if you use a rs.fields(0).value it sometimes is empty?
Is the column MEMO? [url]http://www.aspfaq.com/2188[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Mike" <mike_newsgroups@yahoo.com> wrote in message
news:6a68ace3.0408111959.3667d6a6@posting.google.c om...> Why does this happen:
>
> the code below works fine as-is. If I take out tempValue =
> rs.fields(i).value and put rs.fields(i).value everywhere instead, some
> fields end up empty!! Why does this happen? I'm using Access.
>
>
> while not rs.eof
> for i = 0 to rs.fields.count - 1
> miniId = rs.fields(0).value
> statId = i + 1
> tempValue = rs.fields(i).value
> if (not tempValue = "") And (not isNull(tempValue)) Then
> response.write(tempValue & "<br>")
> statValue = replace(tempValue, "'", "''")
> else
> response.write(tempValue & "<br>")
> statValue = "--"
> end if
Aaron [SQL Server MVP] Guest



Reply With Quote

