Selectively ignoring data?

Results 1 to 2 of 2

Thread: Selectively ignoring data?

  1. #1
    Bill J. Guest

    Default Selectively ignoring data?

    If Session("Letter2Exists") = True Then<BR> RS("Letter2Exists") = True<BR> RS("Letter2Author").Value = Session("Letter2Author")<BR> RS("Letter2Header").Value = Session("Letter2Header")<BR> RS("Letter2Text").Value = Session("Letter2Text")<BR> <BR> If Session("Letter2Response1Exists") = True Then<BR> RS("Letter2Response1Exists") = True<BR> RS("Letter2Response1Author").Value = Session("Letter2Response1Author")<BR> RS("Letter2Response1Text").Value = Session("Letter2Response1Text")<BR> Else<BR> RS("Letter2Response1Exists") = False<BR> End If<BR><BR> If Session("Letter2Response2Exists") = True Then<BR> RS("Letter2Response2Exists") = True<BR> RS("Letter2Response2Author").Value = Session("Letter2Response2Author")<BR> RS("Letter2Response2Text").Value = Session("Letter2Response2Text")<BR> Else<BR> RS("Letter2Response2Exists") = False<BR> End If<BR><BR> If Session("Letter2Response3Exists") = True Then<BR> RS("Letter2Response3Exists") = True<BR> RS("Letter2Response3Author").Value = Session("Letter2Response3Author")<BR> RS("Letter2Response3Text").Value = Session("Letter2Response3Text")<BR> Else<BR> RS("Letter2Response3Exists") = False<BR> End If<BR>Else RS("Letter2Exists") = False<BR><BR>End If<BR><BR>RS.Update<BR>RS.MoveLast<BR><BR><BR>Prob lem:<BR>Above is a representative sample of a pretty simple, albeit lengthy, routine for translating session variables to a database for storage. The code above is repeated for Letter1 through Letter10, with updating after each letter to keep from overloading the RS.Update procedure. <BR><BR>The first copy, which processes Letter1, works perfectly. All of the record fields are created properly. However, for Letter2 through Letter10, the Letter*Text and Letter*Response*Text fields aren&#039t created. The only trend is that the "ignored" fields are all Memo-type, and the "accepted" fields are all Text-type. I&#039m completely dumbstruck by this one, and any suggestions anyone can offer would be a great help. Thanks!<BR><BR>--Bill J.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Selectively ignoring data?

    hmmm<BR><BR>I have had similar problem before, where i was testing the value of a memo field and then trying to access it again it was blank. Doesn&#039t look like that is the case from your code though. I got around the problem by copying the memo field to a variable, then using the variable from then on.<BR><BR>The only suggestion I have for you is to remove the .update and .movelast method calls, until all ten letters have been set. As far as overloading the .update method, I don&#039t think it is a problem. I would think that multiple updates and repositioning would be worse actually. At least try this and see i the problem goes away, that will at least help you debug it.<BR><BR>Also, you might consider normalising your database design further, and slitting each letter into individual records instead of individual columns on the same record. This would save you considerable space, and also it might solve your problem because your code would not require repositioning (if that is indeed the problem)<BR><BR>hope that helps<BR>Tim.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts