Hopefully you have read the book. However, if not, I suggest you first read Dan Brown's book Angels & Demons and then read The DaVinci Code. The depth of research is amazing and both are truly enjoyable thrillers. In fact, I would rank these two books as two of the best pieces of fiction I have ever read.
With regards to the movie and book and the concern expressed by some as to the historical accuracy, I simply say IT'S FICTION! Get over it.