I have the D40 and I love it. However if I had the extra money I might have gotten the Canon because it has exposure bracketing. Though the Canon has a CF slot rather than an SD, however they're both equally cheap these days in terms of memory. I'd advise you to check out http://dpreview.com/ as they have in depth reviews on both of them.
Whatever you choose, it's the lens that's the most important, and not the body.
-------
Intelligence is the ability to avoid doing work, yet getting the work done.