We all know that access is a close partner of asp. Because the two simplest things can always spark together. However, when the filtering is not strict, the Japanese characters are often displayed. After searching, the Japanese character overflows. In this case, we usually think of finding an exe program to solve this problem. I used to write this in C #.
We all know that access is a close partner of asp. Because the two simplest things can always spark together. However, when the filtering is not strict, the Japanese characters are often displayed. After searching, the Japanese character overflows. In this case, we usually think of finding an exe program to solve this problem. I used to write this in C #.
We all know that access is a close partner of asp. Because the two simplest things can always spark together.
However, when we do not strictly filter dataJapaneseCharacter.JapaneseOverflow.
In this case, we usually think of finding an exe program to solve this problem. I used to write such a similar program in C.
Google should be able to find the one I previously wrote. Let's not talk about it.
One day later, I found ASP could be implemented. At that time, I really felt so stupid.
However, this method of ASP is not good. It is easy to cause system crash (ifDatabaseLarge ).
So I just wrote it here. It can be regarded as a reference.
'Next I will explain the following:
Function TransferJapanDc9CnInDB ()
On Error Resume Next
Err. Clear
Dim objRS, I
Set objRS = Server. CreateObject ("ADODB. Recordset ")
ObjRS. CursorType = adOpenKeyset
ObjRS. LockType = adLockReadOnly
ObjRS. ActiveConnection = objConn
ObjRS. Source = "SELECT * FROM [blog_Comment]"
ObjRS. Open ()
If (Not objRS. bof) And (Not objRS. eof) Then
For I = 1 to objRS. RecordCount
'Traverse to see if there is anyJapaneseIf yes, it will overflow. You can simply search for something. It doesn't matter what you search. Because it is traversing ACCESS, as long as the pointer movesJapaneseOverflow.
ObjConn. Execute ("SELECT * FROM [blog_Comment] WHERE comm_ID =" & objRS ("comm_ID") & "AND [comm_Content] LIKE '% URL % '")
If Err. Number =-2147217900 Then
'The overflow error is found here because it is on err.CodeThis is self-debug, but it is not from any place.
ObjConn. execute ("UPDATE [blog_Comment] SET [comm_Content] = '" & FilterSQL (Japan 2html (objRS ("comm_Content ")))&"', [comm_Author] = '"& FilterSQL (Japan2Dc9CnHtml (objRS (" comm_Author ") &" 'where comm_ID = "& objRS (" comm_ID ")&"")
'JapaneseReplaceIs the idea clever. Well. HoweverDatabaseIf it is too large, repeated overflow will cause problems. Memory babies will cry.
Err. Clear
End If
ObjRS. MoveNext
Next
End If
ObjRS. Close
Set objRS = Nothing
'Www .dc9.cn http://www.devdao.com/07/11/28
End Function
Function Japan2Dc9CnHtml (source)
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Source = Replace (source, "success", "success ")
Japan2Html = source
End Function