When I run the following query through Java code, it throws an
SQLException. I'm assuming it has something to do with the temporary
table created by the SQL statement. Any ideas?? The query works from the
control center. I have to do the query this way because MySql currently
doesn't support the "IN" clause.
select * from member inner join (select a.member_id from member_dues as a
left outer join cards as b on a.member_id = b.member_id and 2004 = year
where year is null) as tmp on id = tmp.member_id
java.sql.SQLException: General error message from server: "Can't find
file: '.\testdb\*.frm' (errno: 22)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2168)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1323)
at
com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1129)
at
com.mysql.jdbc.ServerPreparedStatement.<init>(ServerPreparedStatement.java:106)
at
com.mysql.jdbc.Connection.prepareStatement(Connection.java:1076)
at
com.mysql.jdbc.Connection.prepareStatement(Connection.java:1048)