java - SQL - no database selected -
i using prepared statement return items database, when execute no database selected error thrown.
public void getthemarketdata() throws sqlexception, classnotfoundexception{ connection con = dbconnection.getconnection(); logger log = logger.getlogger(login.class.getname()); preparedstatement returnmarketdata = con.preparestatement ("select dealer_table.dealer_name, standard_dealer_link.*, standards_table.standard_value" + "from project.standard_dealer_link" + "inner join dealer_table on standard_dealer_link.dealerid = dealer_table.dealerid" + "inner join standards_table on standard_dealer_link.standardid = standards_table.standardid" + "where standard_dealer_link.quarter= " + this.quarter + "and dealer_table.market = '" + this.market + "';"); resultset marketrs = returnmarketdata.executequery();
is there simple missing? exact format worked other statements.
Comments
Post a Comment