Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 31st, 2003, 06:03 PM
Authorized User
 
Join Date: Jul 2003
Location: Medford, OR, USA.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Memo fields

I have an Access database with a table using a memo field. I am able to store data into that field, and I am able to retrieve and display data from that field. However, I cannot test the field for contents before displaying. Once I have applied an "if" statement to the field contents, it's as though the field is now empty. Displaying it with a response.write statement results in no data being displayed. Is ther a way around this problem?

Samples:
response.write("Show me " & rs("memo")
'displays the data perfectly

if rs("memo")>""
response.write("Show me " & rs("memo")
end if
' displays only the "Show me "

The same problem occurs no matter what method is used to determine whether the field has any content. Merely accessing the field seems to render future accesses impossible.

Reply With Quote
  #2 (permalink)  
Old October 31st, 2003, 06:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , Denmark.
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Have you tried assigning it's value to a variable?

Code:
sMemo = rs("memo")
if sMemo <> "" then
  response.write "Show me " & sMemo
end if
Reply With Quote
  #3 (permalink)  
Old October 31st, 2003, 06:13 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

This is a bit odd indeed, and looks a bit like other known issues with BLOB fields (http://support.microsoft.com/default...NoWebContent=1).

One thing to work around this, is to assign the value of the BLOB Memo) field to a variable and use that in your code:
Code:
Dim BodyText
BodyText = rs("memo")
If Len(BodyText) > 0
  Response.Write("Show me " & BodyText)
End If
This way the Memo field is only accessed once, while you still have full functionality.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format : Memo scandalous Access 2 February 22nd, 2007 10:31 AM
Need help in exporting memo fields to CSV file Programming_starter C# 0 May 22nd, 2006 11:25 AM
formatting memo fields in access database fskilnik Dreamweaver (all versions) 8 February 14th, 2006 06:24 PM
Storing Data in Memo Fields! tks_muthu Classic ASP Databases 2 April 11th, 2005 02:07 AM
Memo Fields with Windows Forms in C# jim.stanley Access 0 November 15th, 2004 05:55 PM



All times are GMT -4. The time now is 09:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.