A new project of the access library type was created, and the dateset. XSD dataset control was used for the three-layer development Dal layer. It was found that the dataset control does not support the like statement.
There is no way to discard the dataset control and use it againCodeMethod.
As you know
The wildcard usage of like in access is as follows:
"?" Represents any single character; "*" Represents zero or multiple characters; "#" represents any number
In SQL Server, % is used, and ** is used in access.
To prevent syntax errors, create a query in access and test it again. No problem (select * From tb_commodity shortname like '* 2009 *').
Run the codeProgramAnd how can't the results be returned? The SQL statements obtained by the interrupt tracking are the same as those obtained by the test. What is the problem ??
After research, we found that if you have to switch back to % again in tableadapter of vs2005, * cannot work !!! (Speechless ....)
I hope you will be able to solve this problem in the future.