Actually, an unofficial theory is that the name James Bond is as much of a code name as 007 is. Hence the explaining away of the different Bond's(Sean Connery, Roger Moore, David Niven, George Lazenby, Timothy Dalton, Pierce Brosnan, Daniel Craig). Another fan theory is that in the movie The Rock, Sean Connery's character of John Mason was James Bond who got ahold of U.S. secrets and was locked away, untried, in prison until he returned those secrets. Again, these are unofficial theories but they kinda make sense.
Oh, and not for nothing but Woody Allen as Jimmy Bond was brilliant.