FoxPro SQL Commands and Functions.
Foxpro Column Type Information (Text).
When creating or modifying a table using OleDb Admin, you can specify a specific FoxPro column type from a list.

FoxPro provider types
This will be the same text (up to the -- comment) that will be provided to the CREATE TABLE command. Additional qualifiers can be added. For example,
D DEFAULT (DATE( ))
will specify that a field defaults to the date the record was appended.
If ISAUTOINCREMENT flag was set, the type
I AUTOINC
will be used. If KEYCOLUMN flag is also set, the type
I AUTOINC PRIMARY KEY
will be used. When Natural Order is selected as the Update Key in the Data Link dialog,
WHERE RECNO( )=nRow
will be used for Write Data Preview (SQL). Most providers produce this script when using Natural Order for UPDATE records. However with FoxPro, the script actually works.
PRIMARY key and UNIQUE (CANDIDATE) indexes can be created using DDL. Regular indexes need to be created using the INDEX ON command, which does not work using DDL. To create regular indexes, unload Flask.exe, set PreferOledbInterfaces to 1, create indexes with Write Data.
Indexes and columns with names longer than 10 characters can be truncated automatically. Subsequent updates will require that the .dfg also contain shortened column names, otherwise the columns will not match. To automatically recover the truncated names, use Reload All.
Load Customers from Nwind.mdb, as in the Crash Course Tutorial . Replace the connection string with a link to a FoxPro database, for example Provider=VFPOLEDB.1;Data Source=C:\DATA\FLASK.DBC . A Write Data command would create a table using:
|
CREATE TABLE [Customers] ( |
and create keys and indexes using
|
ALTER TABLE [Customers] ADD PRIMARY KEY CustomerID
|
to create indexes and a primary key. After creating the table, Write Data Preview (SQL) would produce
-- updating Customers (customerid, companyname, contactname, contacttitle,
address, city, region, postalcode, country, phone, fax)
|
after Polk were changed to Duval in cell 45,5 (LETSS, address). Note that the cell contains a newline, CHR(13)+CHR(10).
DML (INSERT, UPDATE) commands have a binary literal (i.e. 0hBEEF) length restriction of 255.
Sample Test Migration: CategoriesFoxpro.sql (text).
Data
Flask Copyright © 2006 Interscape
Corporation