The SQL statement contains the multiplication number and returns an error.
In ADO, we need to use multiplication in SQL statements. However, after '*' is added, an error always occurs when the program is executed, this is because '*' overlaps with the '*' keyword in SQL, so compilation will fail.
Solution: place the multiplication operation outside the SQL statement, put the result into a variable, and then reference it in the SQL statement.
Int count = (this. aspNetPager1.CurrentPageIndex-1) * this. aspNetPager1.PageSize; string SQL = "select top" + count + "E_Id from Emp order by E_Id asc"; // custom SQL statement
SQL statement Error
Select * from user-info a left outer join buyer-in B on a. buyerid = B. buyerid where a. Aname =?
You have renamed the table and used the table name, so an error is prompted. Use the transfer statement!
When I run an SQL statement in mysql, the following error is returned:
According to your method: CLASS_CODE_DELIMITER NATTONAL
The array name is incorrect. You must add an underscore "_" in front of NATTONAL "_",
Or rename your array name. And try again.
(The key is not to add spaces in the middle of the name)