Today, a particularly strange problem has been found in the development process: When a like query in Access is executed in an Access database, it is found that the results can be queried, which is performed on the database, select * from kpproj where kpname like ' * Test * ', but the same statement is empty in a C # program, what is the case?
This is a very complicated question, through the previous development experience, access in the like need to use the * number, but SQL Server Oracle database to use the standard%, why not at this time? after searching for data, the last discovery is connected to the access driver problem, used to be MDB, the database is ACCDB, and then make Win7 64-bit development system, because my program even uses OLE DB drivers for access, you cannot use "*" in this case and you must use "%". If you are using DAO to access the Access database, you must use "*".
The
discovery is not to encounter access to use *, so according to the actual driver to determine;
C # programs use "like" to query an Access database for empty queries