chetan dhumane wrote:I get exception while executing following query
ResultSet resultset = statement.executeQuery("select * from db_finalreal where cost >=" + minValue + " and cost <= " + maxValue + " and city='"+ city + "'" + " and type='"+ type+"'");
agentid = 1;
agentid = resultset.getInt(12);
agentresultset=agentstatement.executeQuery("select * from db_finalagents where id="+agentid);[/code]
please make sure your SQL statement
.
i think your problem is, you put a space after "and cost <= " :
so please use the following ResultSet SQL :
ResultSet rs = statement.executeQuery("select * from db_finalreal where cost >=" + minValue + " and cost <="
+ maxValue + " and city='"+ city + "' and type='"+ type+"'");
and write :
rs.next();
Thank's
Sorry my english isn't too good