Just a little note:
It works provided you don't cut and paste the DCN number you may retrieve from the US Library of Congress.
While that is an invaluable resource when just about anything else fails it returns the DCN formatted like this "242/.8/0096 20" which causes an error complaining about the entry not being numberic. There's probably a restriction on the field (column in MySQL and other RDBMS speak) that non numeric characters aren't allowed. After checking elsewhere this translates into 242.80096.
For those using the DBN another excellent source for the number is
classify.oclc.org which is where I discovered that what LC seems to be saying is that anything after the "/" is optional while what's after the spaces can be dropped.
Thanks again for your reply! I don't know if you have the time (or energy) to add this to a FAQ about shelving numbers (DCN) as opposed to selling numbers (ISBN) but I can tell you that the Library of Congress has failed me exactly once when looking up a rare, out of print book.
catalog.loc.gov/webvoy.htm