Is it in the file where you save the record you get random chars? If so then it makes sense. Your record is probably created on the heap which will most likely be filled with random garbage before the instance gets created. The memory manager will not fill the allocated pointer with zeroes unless you use a specific method(AllocMem, I think)

There's probably no way around it. So just call FillChar(Myrecord, sizeof(myrecord), 0); first or initialize the variables