INF: Invoking an Editor from ISQLLast reviewed: April 25, 1997Article ID: Q36929 |
The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2
SUMMARYThe following is an explanation of how to envoke an editor from within ISQL.
MORE INFORMATIONBefore running ISQL, the EDITOR environment parameter must be set to the name of the editor's executable file and the executable file must be available on the path. Be sure that environment parameters for the editor (such as TMP or INIT) are also set. Once inside ISQL, use the "ed" command to invoke the editor. ISQL writes the contents of its input buffer to a temporary file and spawns the specified editor to edit that temporary file. When the editor terminates, ISQL reads the temporary file back into its input buffer. The default editor is EDLIN, which will not run in protected mode. If the specified editor cannot be spawned, ISQL will produce the following message
DB-Library: spawnlp failed in dbedit(xxx):nwhere "xxx" is the name of the editor that ISQL is attempting to spawn, and "n" is the C run-time library error code returned by spawnlp(). Common error codes are as follows:
2 Not Found 8 Not 'EXE' format 12 Not enough memoryIf TMP is not set, the MEP editor may produce a GP fault or messages such as "Unable to open swap file." ISQL may produce its own message, as follows
Unknown error from xxx:nwhere "xxx" is the name of the editor that ISQL is attempting to spawn, and "n" is the error code returned by the editor. If you are having difficulty invoking an editor with the "ed" command, try using the ISQL shell command "!!". This command will use the C run-time function system() rather than spawnlp() and may help expose the source of the problem.
|
Additional query words: ISQL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |