Commit 9b5360aa authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(sql-sybase-options): New option.

(sql-sybase): Use it.  Add sql-database to the list of parameters
provided for login.  The options -w 2048 -n are not used any more.
parent 3556c6dd
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
* startup.el (fancy-splash-screens): Set buffer-undo-list to t. * startup.el (fancy-splash-screens): Set buffer-undo-list to t.
Use fancy-splash-delay. Use fancy-splash-delay.
2000-10-18 Alex Schroeder <alex@gnu.org>
* progmodes/sql.el (sql-sybase-options): New option.
(sql-sybase): Use it. Add sql-database to the list of parameters
provided for login. The options -w 2048 -n are not used any more.
2000-10-18 Vinicius Jose Latorre <vinicius@cpqd.com.br> 2000-10-18 Vinicius Jose Latorre <vinicius@cpqd.com.br>
* ps-print.el: Internal variable changes to defcustom, * ps-print.el: Internal variable changes to defcustom,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Alex Schroeder <alex@gnu.org> ;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Alex Schroeder <alex@gnu.org> ;; Maintainer: Alex Schroeder <alex@gnu.org>
;; Version: 1.4.22 ;; Version: 1.4.23
;; Keywords: comm languages processes ;; Keywords: comm languages processes
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -300,6 +300,13 @@ The program can also specify a TCP connection. See `make-comint'." ...@@ -300,6 +300,13 @@ The program can also specify a TCP connection. See `make-comint'."
:type 'file :type 'file
:group 'SQL) :group 'SQL)
(defcustom sql-sybase-options nil
"*List of additional options for `sql-sybase-program'.
Some versions of isql might require the -n option in order to work."
:type '(repeat string)
:version "20.8"
:group 'SQL)
;; Customisation for Informix ;; Customisation for Informix
(defcustom sql-informix-program "dbaccess" (defcustom sql-informix-program "dbaccess"
...@@ -1267,8 +1274,8 @@ If buffer exists and a process is running, just switch to buffer ...@@ -1267,8 +1274,8 @@ If buffer exists and a process is running, just switch to buffer
`*SQL*'. `*SQL*'.
Interpreter used comes from variable `sql-sybase-program'. Login uses Interpreter used comes from variable `sql-sybase-program'. Login uses
the variables `sql-user', `sql-password', and `sql-server' as the variables `sql-server', `sql-user', `sql-password', and
defaults, if set. `sql-database' as defaults, if set.
The buffer is put in sql-interactive-mode, giving commands for sending The buffer is put in sql-interactive-mode, giving commands for sending
input. See `sql-interactive-mode'. input. See `sql-interactive-mode'.
...@@ -1284,15 +1291,15 @@ The default comes from `process-coding-system-alist' and ...@@ -1284,15 +1291,15 @@ The default comes from `process-coding-system-alist' and
(interactive) (interactive)
(if (comint-check-proc "*SQL*") (if (comint-check-proc "*SQL*")
(pop-to-buffer "*SQL*") (pop-to-buffer "*SQL*")
(sql-get-login 'user 'password 'server) (sql-get-login 'server 'user 'password 'server)
(message "Login...") (message "Login...")
;; Put all parameters to the program (if defined) in a list and call ;; Put all parameters to the program (if defined) in a list and call
;; make-comint. ;; make-comint.
(let ((params '("-w" "2048" "-n"))) (let ((params sql-sybase-options))
;; There is no way to specify the database via command line
;; parameters. The -S option specifies the server.
(if (not (string= "" sql-server)) (if (not (string= "" sql-server))
(setq params (append (list "-S" sql-server) params))) (setq params (append (list "-S" sql-server) params)))
(if (not (string= "" sql-database))
(setq params (append (list "-D" sql-database) params)))
(if (not (string= "" sql-password)) (if (not (string= "" sql-password))
(setq params (append (list "-P" sql-password) params))) (setq params (append (list "-P" sql-password) params)))
(if (not (string= "" sql-user)) (if (not (string= "" sql-user))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment