In Step 8, you can control how the SQL Server Upsizing Wizard exports your tables. You can also specify the changes you want the SQL Server Upsizing Wizard to make to the local database. You can create upsizing reports, redirect views to use remote data, create new remote views on tables that are upsized, and save passwords with views.
By default, the SQL Server Upsizing Wizard exports a table's structure and its data. Along with field names and data types, you can also export:
The SQL Server Upsizing Wizard can export additional table properties and create timestamp columns on certain SQL Server tables. The SQL Server Upsizing Wizard can also modify your Visual FoxPro database so that your queries, forms, and reports use the data in your new SQL Server tables, rather than the data in the local Visual FoxPro database.
Visual FoxPro indexes and defaults become SQL Server indexes and defaults. If you choose to export validation rules, the SQL Server Upsizing Wizard attempts to export field- and row-level validation rules to SQL Server, where they become stored procedures called from SQL Server triggers. Exported table relationships also become part of the triggers.
Tip If you export table relationships, be sure to export indexes as well or you might experience mediocre performance.
Indexes
Select to upsize Visual FoxPro .cdx indexes.
Defaults
Select to upsize default values for table fields.
Relationships
Select to upsize relationships stored in the database you are upsizing.
Validation rules
Select to upsize field and table validation rules.
Structure only, no data
Select to upsize the empty table structure, without copying table data to the SQL Server data source.
Use declarative referential integrity
Enabled when upsizing to a SQL Server version 6.x database. Select to create SQL constraints to enforce referential integrity.
Null Mapping
Select the fields that can accept .NULL.
Create upsizing report
Creates a series of reports documenting the results of the upsizing process.
Redirect views to remote data
Changes the definition of local views in the database you are upsizing to remote views that use the upsized server tables as base tables. Your queries, forms, and reports then use views on the data in the new SQL Server data source rather than the original Visual FoxPro data.
Create remote views on tables
When you upsize a local table, you need a remote view to access the upsized table on the remote server. The SQL Server Upsizing Wizard can create new, remote views as you upsize. As the SQL Server Upsizing Wizard creates new remote views, it renames all local versions of tables by adding the suffix "_local" to the table name.
Note Creating remote views on tables as you upsize is not recommended, because these unoptimized views select all the data in the table rather than selecting only the information your application needs. The preferred method is to create parameterized views. You can either create a local parameterized view, which you then upsize by choosing Redirect views to remote data, or create a new parameterized remote view on the table after you've completed the upsizing process. For information on creating parameterized views, see Chapter 8, Creating Views, in the Programmer's Guide.
Save password with views
By default, you must enter your password and login ID when opening a remote view in a new session with Visual FoxPro. Select this option to store your password locally with the remote view definition in your database.
Note This check box is automatically checked for you and disabled if you used a named connection in Step 2 - Select Data Source to access your data source, and that named connection includes a password. This prevents the password from being removed from the connection definition.
When you select Create Upsizing Report, Visual FoxPro generates upsizing reports that document the tables, views, fields, indexes, and referential integrity constraints the SQL Server Upsizing Wizard creates on SQL Server. The SQL Server Upsizing Wizard places the reports in a new project, using the following report names:
The upsizing reports include information about any devices and databases that are created, information about any errors encountered during the upsizing process, and a complete explanation of the way in which each Visual FoxPro object is mapped to a SQL Server object. You can view or print these reports after upsizing is complete.
If you upsize all the tables used by a local view, the local view is renamed by adding the suffix "_local" to the existing local view name. The SQL Server Upsizing Wizard creates a new view based on the SQL statement of the local view, substituting the remote table names for the local table names. The KeyField and other update properties of the view are preserved.
If you upsize only some of the tables used by a local view, the SQL Server Upsizing Wizard does not rename the local views. Instead, it renames the Visual FoxPro tables you export with the suffix "_local." For example, if you export a table named "Employees," the table is renamed "Employees_local" in your database. The SQL Server Upsizing Wizard then creates a remote view for each of the tables you exported. Each view selects all fields and all records from the remote table.
Note Visual FoxPro handles local and remote data in different ways. The data access design of an application using local data may become very inefficient when applied as is to remote data.