Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gendbc code and a .KRT file
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Gendbc code and a .KRT file
Miscellaneous
Thread ID:
00571036
Message ID:
00571036
Views:
64
I have inherited a Visual FoxPro 6.0 application from someone else. I want to add some fields to some of the files. I can do this just fine, but when I run the systems’ backup and restore routines the new fields disappear.

The restore routine first runs a program that was created using FoxPro’s GenDBC program. He called the generated program CreateDB.prg to recreate all of the blank tables. I didn’t want to modify that file so I added the new fields and ran the GenDBC program. I replaced the original code with the code GenDBC created using my new layout. Now my project will not even compile.

The error’s I get are:
“Unable to find Unknown __RI_DELETE_CUSTOMER”
“Unable to find Unknown VALID_CUSTOMER”
I get these two errors for every table in the database.

Both the original CreateDB code and my new code created by GenDBC has the lines:
CREATE TRIGGER ON 'CUSTOMER' FOR DELETE AS __ri_delete_customer()
ALTER TABLE 'CUSTOMER' SET CHECK valid_customer()

I have found that in the Text Files section of my project is the file “CreateDB.KRT.” In this file are the functions that the CreateDB.prg program is trying to run. I don’t really know how the project knows how to use this file, but I haven’t removed it, so I don’t see why it would stop using it.

The KRT file appears to also be created by FoxPro even though it doesn’t say it was like the code that comes from GenDBC. It does say:
*** WARNING *** DO NOT MODIFY THIS FILE IN ANY WAY! *** WARNING ***
* Table Validation Routines *

I cannot find anything anywhere about a KRT file. When I ran GenDBC.prg, it did not appear to make a similar file (KRT or nay other) that had the functions used in the generated code.

Any insight on this would be greatly appreciated.
___________________________
Kenneth Wonderley
http://www.wonderley.com


...the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness and self-control.
Galatians 5:22 & 23
Next
Reply
Map
View

Click here to load this message in the networking platform