Solved

Reading value from recordset removes the data

Posted on 2004-08-27
7
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 11915292
if isNull(rsJobs("howto_apply")) or trim(rsJobs("howto_apply"))=""  or isEmpty(rsJobs("howto_apply")) then

FtB
0
 

Author Comment

by:rolfejr
ID: 11916177
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
ID: 11919125
Have you tried to put END IF after each IF
0
 
LVL 15

Expert Comment

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

Accepted Solution

by:
rolfejr earned 0 total points
ID: 11958924
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

632 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