The FORWARD TO statement enables users to specify the server to which a passthrough connection is required. The statement
can be used in two ways:
Send a single statement to a remote server.
Place SQL Anywhere into passthrough mode for sending a series of statements to a remote server. All subsequent statements
are passed directly to the remote server. To turn passthrough mode off, execute FORWARD TO without a server-name specification.
If you encounter an error from the remote server while in passthrough mode, you must still execute a FORWARD TO statement
to turn passthrough off.
When establishing a connection to server-name on behalf of the user, the database server uses one of the following:
A remote login alias set using CREATE EXTERNLOGIN
If a remote login alias is not set up, the name and password used to communicate with SQL Anywhere
If the connection cannot be made to the server specified, the reason is contained in a message returned to the user.
After statements are passed to the requested server, any results are converted into a form that can be recognized by the client
The FORWARD TO statement is a server directive and cannot be used in stored procedures, triggers, events, or batches.