Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is a table part of a dbc? How to??
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00554114
Message ID:
00581812
Vues:
26
>Sergey,
>
>I need to know database name without opening the table. How this program should be modified to return database name?
>
>Thanks a lot in advance.

Sorry, found in this thread the answer:
********************************************************************
*  Description.......: GetDBCName (without opening a table)
*  Calling Samples...:
*  Parameter List....:
*  Created by........: Cetin Basoz
*  Modified by.......:
********************************************************************
lparameters tcTable
local Handle, lnLowByte, lnHighByte, lnBackLinkStart, lcDBCName
lcDBCName=""
Handle=fopen(m.tcTable)
if Handle>0
     =fseek(Handle,8,0) && Header size store pos - header()
     lnLowByte = asc(fread(Handle,1))
     lnHighByte = asc(fread(Handle,1))*256
     lnBackLinkStart = lnHighByte + lnLowByte - 263 && Backlink at header()-263
     =fseek(Handle,lnBackLinkStart,0)
     lcDBCName = fread(Handle,263)
     lcDBCName=left(m.lcDBCName,at(chr(0),m.lcDBCName)-1)
     =fclose(Handle)
endif
return m.lcDBCNam
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform