Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memos and the “Illegal Operation” message
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Memos and the “Illegal Operation” message
Divers
Thread ID:
00222017
Message ID:
00222017
Vues:
65
Recently, I had a problem with my memo file that I would like to share.

My application had a form that had been working fine for months, then all of a sudden, I started to get the dreaded “This program has performed and illegal operation” message, and “VFP caused a divide error in module VFP.EXE at 0137:00446794…”

As I investigated the problem, I noticed that the table had three memo fields. Where I had previously put data into the memos, the word ‘Memo’ started with a capital - as expected. However, when I clicked the ‘Memo’, nothing happened, other than the first letter of ‘memo’ changed to lower case. Clicking another ‘Memo’ field changed the previous one back to ‘Memo’. What did this all mean?

Using a hex editor, I checked the table header of the associated DBF file and found a problem with the table flag at byte 28 (details are in VFP help). It was set to 0x01, which said the table had a structural .CDX. However, because there was a memo file, it should have read 0x03, the sum of 0x01 (for the structural CDX) and 0x02 (for the memo field).

Armed with this information, I manually changed byte 28 to 0x03 and guess what? I was able to open the memo fields without problems and the “Illegal operation” message went away. I have no idea what caused this byte to be changed, maybe a computer reset, Win95 crash, etc. Who knows? In the near future, I will be adding some low level file processing to my app to ensure that my users are not impacted.

Hopefully, this information will be of use to someone else in the future.
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Répondre
Fil
Voir

Click here to load this message in the networking platform