Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What comes through the wire?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00400707
Message ID:
00400731
Views:
27
>Hi,
>
>Suppose I have a WAN and I want to access a DBF file that is held by a remote machine. Suppose that I have a drive letter (Z:) mapped to this location and I raise the following commands:
>
>use Z:\Customers
>select Name from Customers where ID = "001"

It depends on what exactly the Customers table is composed of. The USE statement will read the header of the DBF file, and determine whether there are structural CDX files and memos - if there is a CDX, the CDX descriptor containing the tags and definitions will get pulled, and if there are any Memo fields or General Fields, the FPT is opened as well. The first record of the Customer table is pulled across, along with any segments of an FPT,since no order was indicated, the file is positioned at the first visible record; if SET DELETED is ON, it may have to skip over deleted records to get the first usable record, if no tag on DELETED() exists to provide a means of identifying the visible records.

In performing the SELECT, the CDX is examined to determine whether there are tags that can be used to identify the records in the DBF that meet the condition; in this case, it'd look to see if there were a TAG based on ID with no FOR clause. If there is a workable index tag, the segments of the CDX file required to construct a map of records for the ID tag would be pulled across. The result of processing the tags would indicate which pieces of the DBF file would have to be brought over the wire. At this point, you'd have transported the headers of the file, the first record, and some portion of the CDX file used to construct a map of the DBF that satisfied the query. At this point, the records of the table that satisfy the query would be pulled across from the .DBF and any associated entries from the .FPT - memo and general fields contain pointers in the DBF to segments in the FPT if in use.

If no CDX exists, or there are no usable tags in the CDX to satisfy the query, then the content of the table gets pulled over, since there's no other way to identify which records satisfy the condition without examining them one by one. I'm not certain as to whether the FPT content comes across record by record or not - I don't know the details of the Rushmore implementation for satisfying a query. At a minimum, the FPT segments of any records satisfying the query condition would come across.

>
>What comes through the wire? Does Visual FoxPro tries to optimize the download of the data or has the table to be completely downloaded in order to the processing be done?
>
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform