query...
select p.id, p.name
from person p
where p.age = ?
the java code...
PreparedStatement ps = conn.prepareStatement(sql);
ps.getParamterMetaData(); // THIS THROWS AN EXCEPTION
Is this a bug? If not, is there a workaround (apart from not using table
aliases, that DOES work)?
java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException:
Incorrect syntax near the keyword 'FROM'. Query: SELECT program FROM
programs WHERE (code = ?) Parameters: [MFE]
Is your driver supposed to work with these simpler queries?
The latest version of the Apache Commons DBUtils, version 1.2, requires a
working stmt.getParameterMetaData() method. There's a chance they could
implement a workaround for drivers that don't implement this method. So if
you can't urgently fix your driver to make it fully work with the
stmt.getParameterMetaData() method, perhaps you should consider urgently
releasing an update that declares the stmt.getParameterMetaData() as
unimplemented.
Respectfully,
Jim
SELECT program FROM programs WHERE (code = ?)
You may wish to open a support incident with PSS if you want to pursue the
possibility of getting a fix for this.