Automatic access ID. The data type in the standard expression does not match

Source: Internet
Author: User
I want to enter a Message ID in the text box to query the message content. However, the Data Type mismatch in the standard expression of the automatic number in access is blocked. After analysis, view the information and find a solution. Here we will share the text box named txtyhid. If it is written as Stringsql

I want to enter a Message ID in the text box to query the message content. However, the Data Type mismatch in the standard expression of the automatic number in access is blocked. After analysis, view the information and find a solution. Here we will share the text box named txtyhid // if it is written as // String SQL =

Enter a message in the text box.No.To query the message content,

But access isAutomaticNo.OfStandardExpressionMediumDataTypeNoMatchAfter analyzing and viewing the information, I found a solution. Here, I will share it with you.

The text box name is txtyhid.


// Write

// String SQL = "select * from yhly where lyr =" + txtyhcx. Text + "'";

// Or perform Integer Conversion String SQL = "select * from yhly where lyr =" + int. Parse (txtyhcx. Text) + "'";

// Or perform Long Integer Conversion


My solutionAutomaticNo.SQL statement Decomposition

String SQL = "select * from yhly where ID = ";

String sql1 = SQL + txtyhid. Text;


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.