General information
Category:
Forms & Form designer
>>Hello!
>>I'm having a problem with a modified form. I created a new table (4.dbf) doing a query with the "SELECT" command acquiring fields from 3different tables (1.dbf, 2.dbf, 3.dbf). Then, opened the new table created by the "SELECT" command (4.dbf) & I used the Form Wizard to create a base form (4.scx); modified, re-organized the locations of the fields, and deleted
>>some titles and fields. Ran the form and it worked O.K. Then I added more information in one of the original 3 tables (2.dbf), ran the same query with the "SELECT" command and saved it to the same table (4.dbf) replacing the old one. Tried to run the same modified form & I get a message saying Error loading file - Parent - record number 4. Index tag is not found.
>> I checked every single one of the index keys of all tables, they were O.K. & to make sure, I made them candidate index key and the problem didn't go away. What am I doing wrong? Where is the bug? And if there is none, how can I use the same form after I update the table? It took me about 2hrs to design the form the way I wanted.
>> Thanks for your cooperation
>When you create a table using SQL Select it will delete your index if you had one before (i.e. 4.cdx no longer will exist). If you have included 4.dbf into a database, along with 1,2&3.dbf, and re-create it progamatically, it may no longer match the structure set up in the data base container. Make sure that it is set up as a free table.
>I am fairly new to VFP. Hope this helps!
I had the same problem with database updates over a wide area network.
Almost anytime I made updates it was impossible to access the tables
anymore. To work around this problem there is a solution that allows you
to keep your table part of a database:
Instead of creating directly your '4.dbf' table form 1,2 and 3, you
may create a temporary table and, after you have done any appropriate
cleanup on 4.dbf, do an APPEND FROM your temporary table. This way,
your indexes should never be modified in any way. This technique may
be also used to make updates of a table (since the SQL UPDATE command
is not used in VFP 3, whereas it is used since version 1.0 of ACCESS)
Let's hope this information will help you. This procedure is quite
heavy, but it is the most secure I could think of for myself.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only