private String sendQuery(String q) {
		ResultSet result = null;
		String resultString = "";
		try {
			result = state.executeQuery(q);
			int numCol = result.getMetaData().getColumnCount();
			String[] table = new String[numCol + 1];
			for (int i = 1; i <= numCol; i++) {
				table[i] = result.getMetaData().getColumnName(i);
				resultString += ", " + table[i];
			}
			resultString = resultString.replaceFirst(", ", "");
			resultString += "\n";
			while (result.next()) {
				String line = "";
				for (int i = 1; i <= numCol; i++) {
					line += ", " + result.getObject(table[i]);
				}
				line = line.replaceFirst(", ", "");
				resultString += line + "\n";
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			return e.getMessage();
		}

		return resultString;
	}