Solved

Reading value from recordset removes the data

Posted on 2004-08-27
7
203 Views
Last Modified: 2006-11-17
I have two lines of code:
if isNull(rsJobs("hours")) or rsJobs("hours")="" then hours=" " else hours=rsJobs("hours")

if isNull(rsJobs("howto_apply")) or rsJobs("howto_apply")="" then howto_apply=" " else howto_apply= rsJobs("howto_apply")

I then write out the variables hours and howto_apply.  The bizarre thing is that it works fine for hours, but not for howto_apply.  As soon as I read the data for rsJobs("howto_apply"), I can no longer access that data.  Even if I later try to write out rsJobs("howto_apply") I get nothing.  The only differences I can see is that howto_apply is a memo field, where hours is a text field, and one field name has an underscore in it.  Any ideas?
0
Comment
Question by:rolfejr
7 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
if isNull(rsJobs("howto_apply")) or trim(rsJobs("howto_apply"))=""  or isEmpty(rsJobs("howto_apply")) then

FtB
0
 

Author Comment

by:rolfejr
Comment Utility
Let me put it a different way:

do while not rsJobs.eof
  hours=rsJobs("hours")
  howto_apply=rsJobs("howto_apply")
  response.write hours
  response.write "<br>"
  response.write howto_apply
  response.write "<br>-----------<br>"
  rsJobs.moveNext
loop

The above code will print out all of the hours in the recordset just fine.  However, it writes nothing for howto_apply.  If I remove the line:
    howto_apply=rsJobs("howto_apply")
and then later write it out with:
    response.write rsJobs("howto_apply")
then it writes out the data just fine.  Something about assigning data from the recordset to a variable "removes" the data from the recordset...but only for howto_apply, not for hours.
0
 

Expert Comment

by:Valadas2
Comment Utility
Have you tried to put END IF after each IF
0
 
LVL 15

Expert Comment

by:joeposter649
Comment Utility
Make sure the memo field is the last field selected in your SQL.
0
 

Accepted Solution

by:
rolfejr earned 0 total points
Comment Utility
I have answered this question.  I changed the field from a Text field to a varchar with a length of 255.  It didn't like something about the Text data type.  Once I made the change, everything was peachy.  Thank you for all your help.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now