|"Now D drive is gone. How do I recover it?"|
When a existing partition and/or the existing data on a partition is deleted in a modern operating system, the data is not erased or wiped from where it was. The data is still there, but where the data is located has been marked (e.g. in the master boot record on the hard drive) such that the operating system sees the space it occupied as available to be used for any new partition or data.
You have to get yourself a third party program that can Un-delete the partition and the data on it. There are some freeware ones on the web, and many ones you must pay for.
Search on the web for: Un-delete partition, or Undelete partition, or unerase partition, or similar
You can't merge two partitions anyway with what's built into XP without deleting the data on both partitions.
You can do that, however, with third party program, what is generically called a "partition manipulation" program, or similar. E.g. Partition Magic 8.x is one you pay for; Partition Logic is freeware and is similar to Partition Magic.
I'm guessing that....
- you have a brand name system, your C drive has too much data on it, you have only one hard drive, and you're trying to add the space D is using to C so you have more free space on C.
If you have a brand name computer, it always has at least one other much smaller partition on it when you intially got it new that has data on it that was put there for a reason.
Sometimes the smaller partition is a Recovery partition, and in that case, the data on it is necessary so that you can use a single Recovery CD or DVD along with that data to restore the original brand name supplied data contents of C.
Sometimes the smaller partition is a NOT a Recovery partition - it's data is used for some other feature . If you don't use that feature, sure, you could delete the D partition and it's data, but you can't add that space to C with what's built into XP without deleting the C partition and all it's data.
In either case, the second partition is relatively tiny. If you do presently have a C partition that's too full, it probably won't be long before it's too full again, even if you do add the space the second partition was using to the C partition.
If you do have a brand name system, your C drive has too much data on it, you have only one hard drive...
- copy the data that is not program data to elsewhere, delete the original data on C ! E.g. Copy some of the music, movies, other stuff you have way too much that takes up a lot of space to CDs or DVDs.
- if it's desktop computer, buy yourself another hard drive to install internally, or buy an external hard drive, copy some of the data from C to that.
- if it's a laptop or netbook computer, if you can only install one hard drive internally, buy yourself an external hard drive, copy some of the data from C to that
or - buy a larger hard drive, and an external enlclosure for it, install it in the external enclosure, use free software available from the web site of either brand of the hard drives to copy the entire data contents of the present hard to the larger one, them swap hard drives, optionally use the original hard drive in an external drive enclosure, if you like.
In any of those cases, you DO NOT have to install most programs that did not come with Windows on the C partition, if you have more than one partition the data can be installed on !!
If you do not choose the default installation location choice or Express install or similar, you change the location of where it's installed, or you use a Custom or similar installation choice, and install the program on a partition other than C.