Using dBase

I recently needed to do some table manipulation with Visual dBase. Not being an expert with this program (I usually write tools for that purpose in Delphi using the BDE or tdbf), I had to look up quite a few commands.

Here are the links that proved useful:

But what I was actually looking for did not show up in a Google search:

How do I replace a field in all records with the corresponding record number multiplied with 10? And this only for those records that do not have a value >= 99999 in that field already.

The answer turned out to be rather simple:

goto top
replace lfdnummer with recno()*10 for lfdnummer < 99999

and just in case you want to replace a value for all records:

replace all lfdnummer with recno()*10