Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Name vs actual File Name
Message
De
22/09/2004 13:09:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00945027
Message ID:
00945104
Vues:
30
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>By some UT member request I'm writing code and got stumped on some thought, which I'm a little bit lazy to create a test, so I hope that somebody can answer the question directly. The ADBOBJECS() function returns table names if used with "Table" parameter. What does it mean table names? Can the name of the table be different than the actual filename? I probably asked that question before but how can we find out the whole filename of the given table without opening it? Though if I want to use LUPDATE() I would need to open that table. Or is there a way to also get last modification date without opening a table?
>>>
>>>Thanks a lot in advance.
>>
>>Yes tablename is a DBC property not actual file name.
>>
>>
open database testdata && Assuming you renamed customer to MyNiceCustomer
>>for ix=1 to ADBObjects(arrProp,"TABLE")
>> if upper(DBGetProp(arrProp[m.ix],"TABLE","Path")) == "CUSTOMER.DBF"
>>    ? arrProp[m.ix], fullpath(DBGetProp(arrProp[m.ix],"TABLE","Path"))
>> endif
>>endfor
>>
>>If w/o opening table includes lowlevel then no.
>>Cetin
>
>Hi Cetin,
>
>How can I obtain the information about record count without opening a table? How reliable this info would be?

W/o opening the table? No way as I said before if you mean including lowlevel opens (or don't know headersize,recsize beforehand). If you're allowed to open lowlevel reccount is stored in byte offsets 4-7 and is reliable as reccount() - it reads you from there.
If you know header(),recsize() beforehand:
nRecs = (FileSize-headersize)/recsize

PS: nRecs = (FileSize-headersize)/recsize
is more reliable than reccount()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform