View Full Version : iRite won't display contents of memo field from Access DB
Ian H
04-01-2009, 08:34 AM
I'm trying to create an update form for a site. I want to display the contents of a memo field from my Access database in the iRite editor but I get the following error:
Invalid use of Null: 'cStr'
I know that there is content in the field as I've created a normal text field above my iRite editor that displays the contents of the memo field without any problems. I've also tried removing the cStr function from the iRite code but I still can't get anything to display in my iRite editor.
Any help with this would be much appreciated. I'm working in ASP btw, not php
Ray Borduin
04-01-2009, 09:43 AM
This means that you have a null field in your database. What happens when you remove the cStr? That is probably the best route if you are trying to stop the error.
What does the code look like on the line throwing the error? I'd say probably remove it and start debugging the other issue. It looks like your field is blank, so it wouldn't show anything. Maybe this is really a problem with the insert page not inserting a value in the first place.
Ian H
04-01-2009, 11:01 AM
"I know that there is content in the field as I've created a normal text field above my iRite editor that displays the contents of the memo field without any problems."
No, it's not a null field and I've tried removing the cStr function and still nothing. No matter what I do the iRite box displays no content. It will display content from all other fields apart from the memo field.
I'm totally stumped on this
Ray Borduin
04-01-2009, 02:01 PM
That error means you are passing a null value to the cStr function... so maybe the error is coming from somewhere else or it is being cleared or it has a typo.
I also remember funny problems with cursor types and memo fields in ASP with Access. You may be running into that problem... if you remove the display above does it appear correctly? I may be wrong but I think sometimes they could only be referred to once depending on the connection type.
Ian H
04-02-2009, 03:27 AM
Ray,
Thanks for the help with this. You were right the memo field value could only be passed once and due to the fact that I was using a text field above my iRite box to display the contents of the memo field, the iRite box wasn't able to display the value.
Although I've no need to change the cursor type for my web app I believe that if you change it to adOpenDynamic then you can display the contents of a memo field more than once in a page. Thought this may help other people.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.