Today, in the process of development, a particularly strange problem has been found: access in the like query time. Run in an Access database and find the results can be queried. This is run on the database. SELECT * from kpproj where kpname like ' * Test * ', but the same statement is empty in a C # program. What's the situation?
This question is really a tangled one. With the experience of development, Access uses the * number in the like. But the SQL Server Oracle database to use the standard%, why not at this time? after searching for information. The last discovery is the connection to the access driver problem, used to be an MDB, the database is ACCDB. Then make the Win7 64-bit development system, because my program even access with the OLE DB driver, so here can not use "*", must use "%". If you are using DAO to access a database, you must use "*".
Discover that you are
not experiencing access using *, so you have to determine it based on the actual driver;
"like "Querying an Access database for empty queries in a C # program