>Hi,
>
>I am having this problem with an application that periodically goes haywire. In other words it won't start( just hangs ), reports start printing funny, data gets mishmashed or things like that. It is an application that uses the same database definition as another application. Generally, to solve the problems I can take the database from the second application and overwrite the one in the first. Anyhoo, the thing I notice about the database that appears corrupted, is that the .dct file has been recently written into and the size has changed. First of all, what is this file? I know it is the database memo file. But a memo file of what? I find all sorts of goodies inside of there including people's email. Secondly, is it a file that should be changed by an application? Thirdly, What might alter that file?
>
The .DCT is the portion of the database container (.DBC file) that holds things not of fixed length, equivalent in form and content to the .FPT that holds memo field data in a DBF using memo fields (in fact, it is nothing more than the memo field portion of the DBC, which is in reality a VFP table.) Thnigs like stored procedures, file references like index and table pointers, view definitions and a whole lot more actually reside in this file, referenced by fields of the .DBC table just like the memo fields of a standard table.
All sorts of things that might update the status of a database could modify the content of the DBC, such as reindexing operations, things like ALTER TABLE, DBSETPROP() and many other commands alter the DCT content on an ongoing basis.
If you're finding that the file is being corrupted with extraneous data, you may be looking at problems on the machine hosting the table in a netrwork environment rather than a problem with the application stations. In a peer-to-peer network, if the 'server' machine crashes with writes pending, all sorts of strange things might end up in the wrong place, or parts of buffers may be resident in the DCT but not be actively referenced.
>These apps run on separate PC's under Windows 98/95. I am using VFP 5.0e. Data gets copied from the second app to the first, but otherwise the two apps operate independently of each other.
>
>Thanks for your help,
>Mike