如何将数据库中的“<”转化为“<”?
我有一个access的数据库,其中存放了一些从网上采集的网址(用动易系统采集的,数据库也是动易生成的,我无法知道它是怎么把这些数据存入数据的),比如 “<img src="http://www.mathtool.cn/images/123.gif" ”,在网页上显示如上,但查看源码会发现“<”显示为“<”,这样网页上只能显示,无法成为链接。我并希望它存在数据中就是“<img src="http://www.mathtool.cn/images/123.gif" ”的形式,但程序运行后并没有把“<”改为“<”,用文本框绑定数据查看,好象个修改成功,但回到动易系统后就发现“<”其实还是被存为了“<”。下面是我的代码:
Public Sub changelink()
Dim strTitle As String
Dim strContent As String
Dim ret
objRst.Close
objCon.Close
Set objRst = Nothing
Set objCon = Nothing
objCon.Open strConStr
objRst.Open "PE_Article", objCon, adOpenDynamic, adLockOptimistic
objRst.MoveFirst
Do While Not objRst.EOF
strTitle = objRst("title").Value
strContent = StrConv(objRst("content").Value, vbFromUnicode)
Form1.Text1.Text = strTitle
Form1.Text2.Text = strContent
If Len(strContent) < 300 Then
If InStr(1, strContent, "<", vbTextCompare) <> 0 Then
strTitle = "find the data!the id is " + Str(objRst("ArticleID").Value) + vbCrLf + "do you want change the data?"
ret = MsgBox(strTitle, vbOKCancel)
If ret = vbOK Then
strContent = Replace(strContent, "<", "<", 1, -1, vbTextCompare)
Form1.Text2.Text = strContent
objRst("content").Value = strContent
objRst.Update
End If
End If
End If
objRst.MoveNext
Loop
MsgBox "complete!"
End Sub
各位大虾帮忙看看是怎么回事?