public void query(String query) {
		boolean col=true;
		int colNum = 0;
		rowCount = 0;
        try {
        	String date;
            Statement st = con.createStatement();
            ResultSet rs = st.executeQuery(query);
            ResultSetMetaData rsmd = rs.getMetaData();
            numberOfColumns = rsmd.getColumnCount();
            columnNames = new String[numberOfColumns];
            dataValues = new String[CONSTANTS.NUMBEROFSTOCKS][numberOfColumns];
            while (rs.next()) {
            	if(col){
            		for(int j = 1;j<numberOfColumns+1;j++){
            			columnNames[j-1] = rsmd.getColumnName(j);
            		}
            		col=false;
            	}
                for (int i = 1; i <= numberOfColumns; i++) {
                	String columnValue = rs.getString(i);
                	/*
                	 * When fetching the date/time from the excel spreadsheet
                	 * there is an arbitrary string appended to the end. This will
                	 * parse the data and remove the string, normalizing the data.
                	 */
                	if(i == 6 || i == 7){
                		date = columnValue.substring(1);
                		date=date.replace("\"_x000D_", "");
                		columnValue = date;
                	}
                	dataValues[colNum][i-1] = columnValue;
                	
                }
                colNum++;
                rowCount++;
                col = false;
               
            }
            st.close(); 
        } catch (Exception ex) {   
        }
        resizeData(rowCount);
        convertToStock();       
	}