Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is the metatable

Status
Not open for further replies.

doton

Programmer
Feb 27, 2019
14
0
0
MX
On sunday i uodated my aplication and tested it ok, on monday i changed a line in a scx form and now the exe gives the error
"One or more required indexes is missing from your metatable"
doc_open
doc_new
doc_descr
doc_type
deleted()


then
"Application cannot run"
 
Why did you edit the SCX directly?
What "line" did you change?


Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"I try to be nice, but sometimes my mouth doesn't cooperate.
 
It's clear you used the Application Wizard of VFP.
That cretes a project with one free table. Whatever you named the project +_app.dbc.

It'll be in the property cmetatable of the app_application class.

metatable_ygkszv.png

You see this table has these indexes."isdel" is the index on deleted().

When they're missing, you manipulated this table ´, by intention or not. The EXE checks, if the table has its indexes and refuses to continue without them. For a good reason, the code will make use of the indexes for sure, and fail without them.

Chriss
 
Chris, So how I can correct the error.
 
Redo the app wizard to get a clean yourprojectname_app.dbf

Then add in the data of your project and move it to your project.

Chriss
 
i cannot find the wizard program.
how can I reindex?
Please help me
 
It's in the main VFP IDE menu: Tools-> Wizards->Application.

If the indexes are lost, you likely don't have the CDX file of the dbf, or is there one? Without even the header of it REINDX won't recreate the indexes. Then you'd need the individual INDEX commands. Well, it's a sure shot the application wizard does it the way it's expected.

Chriss
 
Don't, just don't index your DBF. Just create a new one. It doesn't matter what details you enter into the dialogs of the application wizard, the metatable always has the same structure. So then you have a healthy table with indexes and can fill it with the data of your projects dbf, which lacks indexes. You end up with the right structure including indexes and your current metatable data. That's the best fix you get. I would not do it any other way.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top