Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening a table from a DBC with different pathing
Message
 
À
09/10/2007 10:38:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01259546
Message ID:
01259884
Vues:
27
>You'd need to write to tables' headers and into a binary field in the dbc (in the records of Table type). For the first, you need to fOpen() the dbf - just make sure that you first create a link to a dbc with a long path, so that you can replace it with a shorter one (plus a null byte trailing!) in the dbf's header. As for the binary in the memo in the dbc, I assume the same technique would work - strtran(memo, oldPath+chr(0), newpath+chr(0)), but you better export the memo into a file and look at it under a hex lens. These binary memos aren't exactly rocket science, and aren't really complicated. You just need to care about the trailing bytes, and maybe the prefixing bytes. I know I've hacked that when I was writing my indexer, and at some point I had to excise the primary key info from there and let it be put back later. Um... think that the trick was in issuing a Compile Database every two steps :).

Yeah, I've got it working quite nicely now. I can move the DBC and tables around to all kind of different places, including changing the relative pathing between them and it reconnects everything when first opening the DBC and the tables.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform