SQL Server Upsizing Wizard: Step 4 – Map Field Data Types

See Also

In this step, Visual FoxPro displays the default data type mappings used to convert local data to remote data, as tables are upsized to the server. You can choose to change these default mappings.

You can't change the default mapping for a key field to a data type that prevents the field from being indexed. You can change the default mapping of a field that is part of an index key if you choose a data type that is indexable; however, you might want to change the data types for the other fields in the key to match. Visual FoxPro warns you if you change the default data type mapping for a field that is not a key field but is used in a Visual FoxPro index. If you make a mistake, click Default to reset the data types.

Options

Table

Select the table whose fields you want to map from the list of all the tables you've chosen to upsize.

Timestamp column

Select this check box to add a timestamp column to the server version of the table.

Identity column

Select this check box to add an identity column to the server version of the table.

Default

Choose this button to reset all table field settings for all fields in the selected table back to their defaults. This button in effect undoes any changes you have entered for a specific table in Step 4.

Field Name

Lists the fields contained in the table you selected in the Table list.

FoxPro Type

Lists the Visual FoxPro data type for the field.

Server Type

Lists the server data type to which Visual FoxPro data in this field will be mapped when the table is copied to the server. Click in this field to display a drop-down list from which you can select a different server data type.

Width

Specifies the width of the field.

Precision

Specifies the decimal precision of the field, when applicable.

Creating Timestamp Columns

A SQL Server timestamp column contains a unique value, generated by SQL Server, that is updated whenever the server record is updated. Using a timestamp field on an updatable remote table can increase performance and reliability.

If you update fields using the Visual FoxPro SQL WhereType values DB_KEYANDMODIFIED or DB_KEYANDUPDATABLE, Visual FoxPro must check all modified or all updatable fields to determine whether they were changed by another user. Because text or image fields can be many megabytes in size, comparing these fields for changes can be network-intensive and time-consuming, thereby reducing performance. Reliability can also be affected, because converting the value of a floating point field between client and server might cause the value to appear to have changed when it has not.

When you add a timestamp field to a remote table and update using the SQL WhereType value DB_KEYANDTIMESTAMP, Visual FoxPro uses only the value in the timestamp field to determine whether a record has been changed before updating it. Because Visual FoxPro can compare the value in the timestamp field more quickly than it can evaluate the contexts of large text or image fields, you can increase performance on remote data. However, if you use the SQL WhereType value DB_KEYANDTIMESTAMP, any change in the remote record is recognized as an update conflict, whether or not the changed remote field is in the list of fields you've set as modifiable in your remote view.

If you prefer to update fields using the Visual FoxPro SQL WhereType values DB_KEYANDMODIFIED, you might improve performance by setting the remote view's Compare Memo property to false (.F.). When CompareMemo is set to false, Memo fields are removed from the list of remote view fields compared against the data in the remote server row.