public void connect()
    {
        if(connection == null)
        {
            try
            {
                Class.forName(driver);
            }
            catch(ClassNotFoundException classnotfoundexception)
            {
                throw new UserError("Could not find your database driver.");
            }
            try
            {
                if(user == null || password == null)
                    connection = DriverManager.getConnection(url);
                else
                    connection = DriverManager.getConnection(url, user, password);
            }
            catch(SQLException sqlexception)
            {
                throw new UserError("Could not connect to \"" + url + "\".  Please check that the parameters specified in your server properties file are correct.", sqlexception);
            }
            try
            {
                statement = connection.createStatement();
            }
            catch(SQLException sqlexception1)
            {
                throw new UserError("Could not create a SQL statement using your database.");
            }
        }
    }