Remote Data Tab, Options Dialog Box
Contains options for remote (ODBC) view and connection defaults.
When you choose Set As Default — which appears on every tab in the dialog box — Visual FoxPro saves all the options on all tabs.
Remote View Defaults
Settings in the Remote view defaults box represent Visual FoxPro cursor settings for the current session. If you choose Set As Default, the settings become the defaults for subsequent sessions. The options in this box correspond to settings you make or get using the CURSORSETPROP( ) Function and CURSORGETPROP( ) Function.
- Share connection
Specifies that Visual FoxPro uses the current connection for new views, which is useful if a data source supports only one connection at a time.
- Fetch memo
Specifies that Visual FoxPro does not fetch memo and general fields from the data source until a memo or general field is activated in the view output. Clear this option to reduce the amount of data downloaded initially from the remote table — this results in faster performance.
- SQL updates: Criteria
Specifies what fields Visual FoxPro checks on a remote server to determine whether a record has changed before you attempt to update it. The update fails if the data in the fields you specify has changed.
- SQL updates: Method
Specifies whether Visual FoxPro uses SQL UPDATE or SQL DELETE and then INSERT to update information on the remote server.
- Records to fetch at a time
Specifies how many records Visual FoxPro should return at a time from the remote data source. Choose All to specify that all records should be returned in the first fetch operation. This setting is limited by the value specified in Maximum records to fetch.
- Maximum records to fetch
Specifies the total number of records returned by a view, which can help prevent you from downloading an excessive amount of data if you have constructed a query incorrectly. Choose All to specify that all records should be returned.
- Use memo for fields >=
Specifies the maximum length of data in long Character fields. If character data exceeds the specified length, Visual FoxPro converts it to a memo field in the output of your view. The default is 255, the maximum size of a character field in Visual FoxPro.
- Records to batch update
Specifies the number of update statements sent at once for views. The default is 1. Adjusting this value can greatly increase update performance. For more information, see the REPLACE command and Scope Clauses.
Settings in the Connection defaults box represent Visual FoxPro global default settings for connections. The options in this box correspond to settings you make or get using the SQLSETPROP( ) Function and SQLGETPROP( ) Function.
- Asynchronous execution
Specifies that Visual FoxPro executes SQL pass-through commands (using SQLEXEC( ) Function, SQLMORERESULTS( ) Function, SQLTABLES( ) Function, and SQLCOLUMNS( ) Function) in the background after returning control to your application. If you choose this option, your application can display progress information and can make it possible for users to interrupt a command with the ESC key if SET ESCAPE Command has been set to true. You can determine the status of a SQL command executing asynchronously by calling one of the pass-through functions repeatedly until it reports that the command is done. The default is that this option is disabled (synchronous execution), which specifies that Visual FoxPro waits until the pass-through SQL command is complete before returning control to your application.
- Display warnings
Enables the display of warning messages.
- Batch processing
Specifies that when you send multiple SQL pass-through statements using SQLEXEC( ) Function Visual FoxPro does not return any results until all individual result sets have been retrieved. Corresponds to setting BatchMode in the SQLSETPROP( ) Function. If this option is disabled, you must call SQLMORERESULTS( ) Function to determine whether data is available.
- Automatic transactions
Specifies that transactions are handled automatically by the connection on remote tables. If you clear this option, you must handle transaction processing manually using SQLCOMMIT( ) Function and SQLROLLBACK( ) Function.
- Show login
Specifies whether to display login prompts when a connection is activated (if the connection requires users to be logged in). For example, Only When Necessary specifies that login prompts appear only for login information not specified in the connection or view definition.
- Connection timeout (sec)
Specifies the number of seconds (between 0 and 600) to wait for a connection to be established with the remote server. If the connection cannot be established within the specified time, Visual FoxPro generates an error. Specify 0 to wait indefinitely for a connection.
- Idle timeout (min)
Specifies the number of minutes of idle time allowed before the connection is deactivated. If a request to the server is not made within the specified time, Visual FoxPro terminates the connection. However, Visual FoxPro attempts to reconnect automatically if a request to the server is made after the connection has timed out.
- Query timeout (sec)
Specifies the number of seconds (between 0 and 600) to wait for the server to respond to a request. If the server takes longer than the specified number of seconds to process the query, Visual FoxPro generates an error. Specify 0 to wait indefinitely for query results.
- Wait time (ms)
Specifies the number of milliseconds that elapse before Visual FoxPro checks if the SQL statement has completed executing.
Creating Views | Sharing Connections for Multiple Remote Views | Memo Field Type | REPLACE command | Scope Clauses | SQLEXEC( ) Function | SQLGETPROP( ) Function | SQLSETPROP( ) Function | Options Dialog Box