Forum Moderators: open

Message Too Old, No Replies

Problems with Memo field in Access

Seems to have a input limit

         

webboy1

10:41 am on Sep 3, 2003 (gmt 0)

10+ Year Member



Hi,

I have used access a few times before, but generally use SQL Server.

For my most recent project i have used access. All generally works fine, however i am having trouble with my MEMO field.

I have a form which inserts into the memo field.

It seems to be limiting the amount of text i can enter into it. I know Memo has a limit of around 64K, which i have heard is the equivalent of 30 pages or so.

I am getting this error when im trying to insert a few small paragraphs. I have to take out some of the text until it accepts it.

The info going into the Memo field is news articles, so i really need it to accept a lot more than 3 paragraphs.

Is there anything i could have missed? Or does anyone know anything that could cause the MEMO field to not accept 3+ paragraphs of text?

Cheers
Webboy

ukgimp

10:48 am on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Guess:

is punctuation in your paragraph throwing your insert?

webboy1

9:28 am on Sep 4, 2003 (gmt 0)

10+ Year Member



That was my first thought, but if this is the problem, then it is an inconsistent probelm.

Within the story field of my form i have also been wrapping around some HTML link tags i.e. <a href="#" class="something"></a>

Do these take up more memory. Even if they did....would they take up the equivelant of 30 pages worth of memory?

I deleted the last paragraph from my story and re-entered it, and it worked fine. The first to paragraphs also contained link tags. There was nothing different between the first 2 paragraphs and the one i had to delete.

This makes me think I have done something wrong somewhere, as the MEMO field only seems to be accepting a small amount of text. After looking up books etc, i still cannot see what it could be.

Cheers
Webboy

Mark_A

2:01 pm on Sep 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



are you sure the form field can cope with the size of information you want to insert in the memo field.

When I have issues like this with memo fields I usually find some size restriction before I got the data into the memo field is the cause.

hth

skipfactor

2:49 pm on Sep 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is your tags are kanking things up. I'm also guessing you're using VBscript. My apologies if not; this may or may not help but works for me. Author in Word using normal punctuation, basic bullets even work. Paste into the form (no tags) & insert. On the page you want to pull the data add these functions:

<%
Function DoWhiteSpace(str)
DoWhiteSpace = (Replace(str, vbCrlf, "<br>"))
End Function
%>

<%
Function LinkURLs(byVal strIn)
'############################################
'# - Creates an HTML link for any #
'# HTTP, HTTPS, FTP, FTPS, NEWS or MAILTO #
'# path in a string. #
'# - REQUIRES VBSCRIPT SCRIPTING ENGINE 5.5 #
'############################################
dim re, sOut

set re = New RegExp
re.global = true
re.ignorecase = true
're.multiline = true

' pattern that parses and finds any Internet URLs:
re.pattern = _
"((mailto\:¦(news¦(ht¦f)tp(s?))\://){1}\S+)"

' replace method of RegExp object uses a remembered
' pattern denoted as $1 to link the found URL(s)
sOut = re.replace( strIn, _
"<A HREF=""$1"" TARGET=""_new"">$1</A>")

set re = Nothing
LinkURLs = sOut
End Function
%>

On the memo field you pull it like this & apply your class:

<%=DoWhiteSpace(LinkURLs((rsRecordset.Fields.Item("MemoFieldName").Value)))%>

davemarks

3:04 pm on Sep 4, 2003 (gmt 0)

10+ Year Member



As was mentioned above, make sure you're using textarea for your form field, as a textbox will have a limit.

Also make sure you are using the correct sql update method, i believe some methods have a limit on how much data you can inject

aspdesigner

9:17 pm on Sep 6, 2003 (gmt 0)

10+ Year Member



Make sure your form is doing a POST and not a GET. Most web servers have a limit to the # of chars in a URL, the rest gets "cut-off".

Also, if your having trouble with your contents while doing an SQL INSERT into Access, why not use the Recordset method instead?

i.e. -

(open your rs)
...
rs.AddNew
rs.Fields("MyMemoField") = MyLongText
...
(add your other fields here)
rs.Update
rs.Close
Set rs=Nothing

This can solve a lot of problems you would otherwise have with INSERT (such as embedded quotes in your data, etc.)