SQL query is related to encoding.

Source: Internet
Author: User

SQL query is related to encoding.

In the last two days, we found that the query statement has a relationship with the encoding.

SQL = "select * from user where sex = 'Lady 'and datediff ('D', regtime, #" & currentuserregdate & "#) = 0"

The corresponding encoding must be

<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>

Previously, the <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>

Therefore, it is concluded that the key subquery must use gb2312 encoding for Chinese characters.

Avoid keyword Query

Strconn = "provider = Microsoft. Jet. oledb.4.0; Data Source =" & server. mappath ("databases/DTA. mdb ")
Set conn = server. Createobject ("ADODB. Connection ")
Conn. Open strconn

SQL = "select * From productprice where language = '" & Language & "'order by serverstatus, servername, fractionname"

If jet4.0 is used as the driver of the earlier version, the driver of the earlier version is often disconnected.

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.