Link to home
Start Free TrialLog in
Avatar of Wayne Barron
Wayne BarronFlag for United States of America

asked on

Little square block characters in my database?

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
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Is suspect strMemo contains Lf ( CHAR(10) ) characters not CrLf ( CHAR(13) + CHAR(10) )
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wayne Barron

ASKER

Thanks a bunch AC

Have a good one.
Carrzkiss