Description
Use this statement to send native syntax SQL statements to a remote server.
Syntax 1
FORWARD TO server-name sql-statement
Syntax 2
FORWARD TO [ server-name ]
Usage
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:
Syntax 1 Send a single statement to a remote server.
Syntax 2 Place Adaptive Server 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, issue FORWARD TO without a server-namespecification.
If you encounter an error from the remote server while in passthrough mode, you must still issue a FORWARD TO statement to turn passthrough off.
When establishing a connection to server-name on behalf of the user, the server uses:
A remote login alias set using CREATE EXTERNLOGIN, or
If a remote login alias is not set up, the name and password used to communicate with Adaptive Server 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 program.
server-name The name of the remote server.
SQL-statement A command in the native SQL syntax of the remote server. The command or group of commands is enclosed in curly brackets ({}).
NoteThe FORWARD TO statement is a server directive and cannot be used within procedures or batches. |
Permissions
None
Side effects
The remote connection is set to AUTOCOMMIT (unchained) mode for the duration of the FORWARD TO session. Any work that was pending prior to the FORWARD TO statement is automatically committed.
Standards and compatibility
SQL/92 Vendor extension.
SQL/99 Vendor extension.
Sybase Supported by Open Client/Open Server.
Example
The following example shows a passthrough session with the remote server ase_prod:
FORWARD TO aseprod
'SELECT * FROM titles; SELECT * FROM authors';
FORWARD TO
'Mobile > PocketBuilder' 카테고리의 다른 글
SYMBOL MC70XX 부팅 (0) | 2013.05.03 |
---|---|
PDA : 중국사이트 개발시 (0) | 2013.05.03 |
PoketBuilder 배포 파일과 개발툴 버전은 동일하게. (0) | 2008.12.01 |
ASA에서 사용하는 SQL이 아닌 오라클의 SQL로(비표준) ASA에 QUERY시 (0) | 2008.12.01 |
PDA : 중국사이트 개발시 (0) | 2008.12.01 |