Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directly Editing SCT Files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00252826
Message ID:
00252884
Vues:
11
>Dear Paul:
>
>It would still be easier programmatically to change the cursor properties in the SCT file directly as it occupies a line to itself. Taking a quick peek at the file it looks like I could change the length of the text lines without damaging the integrity of the files, but then this is something I haven't tried. Do you think it is safe to change the SCT file programmatically if it is opened as a low-level file?
>
>Bruce

Bruce,

I would recommentd against manipulating the SCT file directly. If your new path is a different length than the exisitng path the sct pointers in the dbf can become out of synch and cause all kinds of problems.

The solution to your problem is easy once you understand the sequence of events in the instantiation of a form. The form's load runs, the DE is loaded and tables open (if AutoOpenTable is .T.) then the form's Load event is run to completion, then the form's Init runs.

So if you want to localize the paths for teh cursors you simply set AutoOpenTables to .F., in the form's Load you change the value of the CursorSource and/or Database properties for each cursor and then finally call the DE's OpenTables method.

In the book Effective Techniques for Application Development with VFP there is an example of a form class that does this.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform