Data Type Mapping in the Upsizing WizardLast reviewed: April 30, 1996Article ID: Q130166 |
The information in this article applies to:
SUMMARYField names and data types are automatically translated into SQL Server fields when a Visual FoxPro table is exported by the Upsizing Wizard. This article lists the data type mapping that occurs between Visual FoxPro and SQL when the data is exported from the Upsizing Wizard. The information in this article is also available under many separate topics in the Visual FoxPro Help file. Search using "Upsizing Wizard."
MORE INFORMATIONField names and data types are automatically translated into SQL Server fields when a Visual FoxPro table is exported by the Upsizing Wizard. Visual FoxPro data types map to SQL Server data types as follows:
Visual FoxPro SQL Server Abbreviation Data Type Data Type ----------------------------------------- C Character char Y Currency money D Date datetime T DateTime datetime B Double float F Float float G General image I Integer int L Logical bit M Memo text N Numeric float P Picture image Expressions that Map Directly from Visual FoxPro to SQL ServerThe following expressions are the same on Visual FoxPro and on SQL Server:
CEILING() MAX() PADR() LEN() MIN() PROPER() LOG() PADL() STR() Index Type MappingSQL Server and Visual FoxPro indexes are very similar. The following table shows how Visual FoxPro index types are converted to SQL Server index types:
Visual FoxPro Index Type SQL Server 4.x Index Type ---------------------------------------------------- Primary Clustered Unique Candidate Unique Unique, Regular Non-uniqueThe Upsizing Wizard uses Visual FoxPro tag names as names for indexes on SQL Server. If the tag name is a reserved word on the server, the wizard alters the tag name by appending the underscore (_) character. NOTE: SQL Server doesn't support ascending or descending indexes, nor does it permit expressions within server indexes. The Upsizing Wizard removes Visual FoxPro expressions from index expressions as the index is upsized; only field names are sent to the server.
SQL Server Data Types that Force Timestamp ColumnsIf you choose Add Timestamp Field, by default the Upsizing Wizard adds a new column with the Timestamp data type if the SQL Server table to be created will have any of the following data types:
binary varbinary float real image text Object MappingThe following table summarizes how objects are mapped from Visual FoxPro to SQL Server:
Visual FoxPro objects SQL Server objects -------------------------------------------------------------------- Database Database Table Table Indexes Indexes Field Field Default Default Table validation rule SQL Server stored procedures, called from UPDATE and INSERT triggers Field validation rule SQL Server stored procedures, called from UPDATE and INSERT triggers Persistent relationships Update, Insert, and Delete triggers (where used for referential integrity constraints) Referential Integrity and Rule MappingThe following table describes the triggers created by the Upsizing Wizard. Any specific trigger might contain code to emulate some or all of the Visual FoxPro functionalities listed.
Trigger Visual FoxPro Functionality Emulated ----------------------------------------------------------- UPDATE Validation rules (field- and record-level validation) Referential integrity INSERT Validation rules (field- and record-level validation) Referential integrity (child table triggers only) DELETE (Parent Referential integrity table only) |
Additional reference words: VFoxWin 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |