I still use my Nikon D40 for my lunar work - in preference to either my Canon 350D or 40D. For some reason I just prefer the colour it produces on this object - even after experimenting ad nauseam with various white balance settings on all of them.
For deep sky, I've found that the D40 likes to produce a fair amount of purple cast in bright stars. It can be eliminated, for the most part, in post-shoot processing. For a camera that doesn't turn off the read-out amplifier during the exposure (such as the 40D Canon does) it controls amp glow far better than the 350D. I have qualified this by providing a series of test exposures from my D40 here:
http://www.omaroo.com/index.php?opti...g2_itemId=2381
Noise levels at medium ISO settings were also noticeably better than those generated by the 350D. Noise control was a fair step up from the D50/70 days preceding it.
The D40 doesn't have a physical cable release, but works just fine with an infrared remote. All you need to do is set it to bulb mode, press the remote and time it yourself. A bit of a pain but no biggie.
It's a very good camera. Given that it was Nikon's entry-level DSLR, it has provided many astrophotographers with good results.