From my understanding, there are 6 variations of DVI cabling. DVI-D, DVI-A, DVI-I and then the Dual Link version of each. "D" being digital, "A" being analog, and "I" being integrated, or both D and A on one cable. The Dual Link adds 6 pins to the center for increased bandwidth.
As far as using them, you obviously can't physically plug a DVI-I male (with the 4 pins around the slot) into a DVI-D female (no pins around the slot) port. Fortunately, I rarely see a DVI-D female port in the wild. If anything, it's a DVI-I port with the analog pins just dead.
The good news is you're probably not using the analog part of the signal, just the digital, so there isn't need to go and buy a DVI-I cable... Unless one of two things:
1) the TV really wants the analog signal. In which case you need to get DVI-A or DVI-I ("I" would be more versatile)... or
2) You cannot physicaly attach the cable; For instance, if the TV port is DVI-D female, and your cable is DVI-I male. Those 4 analog pins are going to physically block connecting it.
If you haven't tried it, just try it; If it fits, it will most likely work just fine.