public void addMessage(ChatMessage message){
		try {
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();
			
			DateFormat dtf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			String currentDate = dtf.format(new Date());
			
			String sqlStatement = "INSERT INTO chatmessages (user_uid, channel_cid, message, messagedate) VALUES (" + message.getUserID() + ", " + message.getChannelCID() + ", '" + message.getMessage() + "', '" + currentDate + "')";
			
			statement.executeUpdate(sqlStatement);

			statement.close();
			connection.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}