Little square block characters in my database?

Wayne Barron
Wayne Barron used Ask the Experts™
on
Hello All;
(Classic ASP / SQL Server 2005 Ent.)

I have seen these questions come in now and then.

I am using this

strMemo = replace(strMemo,vbCrLf,"<br />")

It just started happening today.
Everything was working fine up until now.

Below is one of my codes that WAS working that now, inserts this crazy little squares.

Cannot someone please tell me what in the world has happened?
(Image attached of the Squares in the DB)
Carrzkiss
Set frcmd=Server.CreateObject("ADODB.Command")
frcmd.ActiveConnection=objConn
strMemo = trim(request.Form("Memo"))
strMemo = trim(replace(strMemo,"'","''"))
strMemo = trim(replace(strMemo,vbCrLf,"<br />"))
MySiteID = int(request.Form("SiteID"))
MyMemID = int(request.Form("MemID"))
'if request.form("PWT") then
FriendsRequestSQL = "INSERT INTO MyForms (MemID, VisID, MyMemo) values (?,?,?)"
'response.Write FriendsRequestSQL & "<br / >"
'response.End()
frcmd.CommandText=FriendsRequestSQL
frcmd.Parameters.Append frcmd.CreateParameter("@MemID", adInteger,adParamInput, , MyMemID)
frcmd.Parameters.Append frcmd.CreateParameter("@VisID", adInteger,adParamInput, , MySiteID)
frcmd.Parameters.Append frcmd.CreateParameter("@MyMemo", adVarChar,adParamInput, 4000, strMemo)
frcmd.Execute

Open in new window

Squares.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012

Commented:
Is suspect strMemo contains Lf ( CHAR(10) ) characters not CrLf ( CHAR(13) + CHAR(10) )
Top Expert 2012
Commented:
If it is then then change this line:
strMemo = trim(replace(strMemo,vbCrLf,"<br />"))

To:
strMemo = Trim(Replace(strMemo,vbLf, "<br />"))
Wayne BarronAuthor, Web Developer
Top Expert 2009

Author

Commented:
Thanks a bunch AC

Have a good one.
Carrzkiss

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial