ASP in Access fuzzy query "Memory Overflow" solution _ Application Tips

Source: Internet
Author: User

Today in the daily maintenance of a website, found that the site's message program did not undergo a rigorous validation of filtering, resulting in nearly 100,000 garbage data. And there is important information to clean up the data and to add more stringent verification measures.

and by deleting it directly in the database is not very scientific, will mistakenly delete a lot of important information.

Through the Fuzzy query statement:

Copy Code code as follows:

SELECT * from Feedback where Comments like '%http% '

Result: "Memory Overflow"

After a continuous search, identified the main reasons for the problem:

ASP in the use of the LIKE keyword query Japanese symbols will be an error, such as Chr (-23075), prompted memory overflow.
A memory overflow error can also occur if the data in the datasheet contains Japanese or some special non-simplified kanji symbols.


The internet said that the above issues have been Microsoft Power Camp Microsoft engineers confirmed that the product for the BUG, can not be resolved. The only way to do this is to encode the data in the entire database into ANSI text format and save it. When the show is decode.

No solution, only the above mentioned, the field transformation to save to another new field, and then the cleanup operation. It's hard to deal with this standard data.

encodestring function for character escape

Copy Code code as follows:

Function encodestring (strwords)
Dim I as Long
Dim Strencodewords
For i = 1 to Len (strwords)
Strencodewords = strencodewords & CStr (ASC (Mid (Strwords, I, 1)) & ","
Next

encodestring = Strencodewords
End Function

After escaping, the keyword is escaped in a blur search.

Copy Code code as follows:

Delete * from Feedback where comments_new like '%&encodestring ("http") &% '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.