I used to have it myself. If it is like most other EA games (i forget if it had this or not) when you bought the game new it had an EA card in the case with the online access code (online key). If you bought it used it would not have this, and therefore would not be able to connect to the EA servers.
If i remember correctly BFBC2 had the equivalent of the online key called VIP. If you did not buy it new and get the VIP pass then half the maps not work. But although you were restricted by which maps you could play i thought you could still play the basic maps online.
You can get VIP at Gamestop for $15 though.
Honestly i just tell people, never buy any EA game used.