who is reporting that error ? windows, billgates's seceratary ? your cat ?
if it was ollydbg reporting that error then that means you are modifying your executable over and above your raw size
raw size will be in installments of 0x200 bytes while virtual size will be in installments of 0x1000 bytes
while mapping the windows loader will map all sections to the size of 0x1000
so there will be lot of space available to modify in memory
but when writing back there isnt enough space
so ollydbg will report that error try dumping your memory with ollydump with all the changes intact
or try adding a section at the end big enough to hold your modifications
and trampoline there
btw you could have searched this forum and could have found out all of this by yourself there are atleast 4 posts that return back if you tried searching
"unable to locate data"
of course google returns > 20,000 hits
Results 1 - 10 of about 25,200 for unable to locate data ollydbg. (0.37 seconds