Hello Luis. Welcome to the forum.
There are a lot of things that can cause drop outs. Some things to check include...
--What size files are you writing? - this means are you recording at 24bit 44.1 or 24 bit 88.2? Find this out... it can make a big difference. Most of us have the ability to try to write files that are bigger than our hard drives can keep up with. This can cause drop outs. For example, for me, I can do 4 tracks at 24 bit 88.2 but when I try to go up to 8 tracks of the same, I often reduce my sample rate to 44.1 to be sure I don't get drop outs (8 tracks of 44.1 writes the identical amount of data as 4 tracks of 88.2).
--Check your driver settings. Most of us use the ASIO setting. Make sure you have your latest drivers for your device.
--Check the buffer size for your device. For my device, buffer size might cause crackles if set too low, but it doesn't normally cause drop outs.
--Check Deferred Procedure Call Latency. Some computers have drivers that make it hard to record.
http://www.thesycon.de/eng/latency_check.shtml Check to see if you have driver issues. If you do, it's not the end of the world. For me, I disable my video adapter and my wifi card and my battery ACPI Compliant Control before recording and I have no problems.
Other things can impact you as well, like virus scanners. I usually add Sonar to the exceptions list for scanners to be sure that it isn't scanning while I record. I know my music isn't a virus. :-)
You should be patient, but persistent in getting it to work. I have other methods of recording the wav files, and so I didn't bother recording directly into the computer for years. I would just mix with Sonar. I realize now that I could have been recording directly to the computer years sooner than I did. (I finally started getting it to work when I joined the forum... thanks everyone!)