Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is a table part of a dbc? How to??
Message
From
08/09/2001 04:28:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00554114
Message ID:
00554252
Views:
18
>Nadya -
>
>So far, I think you are giving me the best advice. The idea of searching withing the DBF (I would just open it with low-level file i/o and grab the header) and searching for .DBC might do the trick.
>
>Thanks!!
>
>Regards,
>AL

Alex,
Information is stored just after header record terminator and 263 bytes max at length. ie:
handle=fopen(lcTable)
=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)
lcBacklink = fread(handle,263)
=fclose(handle)
However I don't think you would need this. Use any command like select, copy to get a copy. Keep in mind once you get a free copy you lose longfieldnames. And free table is no different in this context.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform