Hi there,
In my database I have a table named PROSPECTS. One of the fields in that table is STATE_PROVINCE.
I have a method named getProspectInfo(...) which is supposed to return all the data on a given individual including the STATE_PROVINCE.
My SQL statement reads like this:
SELECT FIRSTNAME,LASTNAME,COMPANY,ADDRESS1,ADDRESS2,CITY,STATE_PROVINCE,COUNTRY,ZIP_PCODE,PHONE,EMAIL_ADDRESS FROM PROSPECTS WHERE ID=14;
However, in my method when I call
String temp = resultSet.getString("STATE_PR0VINCE");
I keep getting an SQLException that states it cannot find the column named STATE_PROVINCE. It doesn't have a problem with any of the other columns. What gives? STATE_PROVINCE DOES EXIST in the the PROSPECTS table! Why is it giving me such a hard time?
Here's the actual readout:
java.sql.SQLException: Column 'STATE_PR0VINCE' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2316)
at com.mysql.jdbc.ResultSet.getString(ResultSet.java:1822)
at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:224)
at mvcs.ManagerModel.getProspectInfo(ManagerModel.java:2442)
Please advise,
Alan