Forum Moderators: open
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
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
<%
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, sOutset 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)))%>
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.)