The following example copies the result set from a query on an SQL-based-server to a local DBF file:

d = new Database()

d.databaseName = "SOMESQL"

d.active = true

q = new Query()

q.database = d

q.sql = "select * from SOMETABLE where THIS = 'that' order by ID"

q.active = true

u = new UpdateSet()

u.source = q.rowset

u.destination = "RESULTS.DBF"

u.copy()

This example copies all the rows from the same SQL-based-server table to a local DBF file without using a Query object:

d = new Database()

d.databaseName = "SOMESQL"

d.active = true

u = new UpdateSet()

u.source = ":SOMESQL:SOMETABLE"

u.destination = "SOMEDUP.DBF"

u.copy()