I'm trying to connect to an MSAccess database and retrieve some data. With simple examples all runs well but if i'm going to use some where clauses i get no data.
This example is ok:
PreparedStatement stm = con.prepareStatement("SELECT A.* FROM A");
ResultSet rs = stm.executeQuery();
rs.next();
The next example get no rows:
PreparedStatement stm = con.prepareStatement("SELECT A.* FROM A WHERE (((A.Name) LIKE ?))");
stm.setString(1,"*");
ResultSet rs = stm.executeQuery();
rs.next();
I don't know where the error lies: in the driver or in the sql syntax.
The sql statement is taken from the query builder in MSAccess.
All what is a little bit more complex in a where clause is a really hard to figure out. Is there any documentation reagrding sql syntax of MSAccess ?
Update
Yes in the jdbc sql statement i have to use "SQL standard" % wildcard while the Access sql builder is using *. Now going to query with dates =8-o