public String validateDeviceInVehicle(long deviceid, long vehicleId) {
        String actionResult = "";
        try {
            m_Connection = getDbConnection().getConnection();
            m_Statement = m_Connection.createStatement();
            m_ResultSet = m_Statement.executeQuery("select deviceid from vehicle where deviceid='" + deviceid
                    + "' and vehicleid='" + vehicleId + "'");
            log.info(m_ResultSet + "ResultSet");
            if (m_ResultSet.next()) {
                actionResult = "ok";
            } else {
                try {
                    m_ResultSet = m_Statement.executeQuery("select deviceid from vehicle where deviceid='" + deviceid + "'");
                    if (m_ResultSet.next()) {
                        actionResult = "deviceidExist";
                    } else {
                        actionResult = "ok";
                    }
                } catch (SQLException se) {
                    se.printStackTrace();
                } finally {
                    try {
                        if (m_ResultSet != null) {
                            m_ResultSet.close();
                        }
                        if (m_Statement != null) {
                            m_Statement.close();
                        }
                        if (m_Connection != null) {
                            m_Connection.close();
                        }
                    } catch (SQLException ex) {
                        ex.printStackTrace();
                    }
                }
            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
        return actionResult;

    }