Function: sql-comint-ms

sql-comint-ms is a byte-compiled function defined in sql.el.gz.

Signature

(sql-comint-ms PRODUCT OPTIONS &optional BUF-NAME)

Documentation

Create comint buffer and connect to Microsoft SQL Server.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-comint-ms (product options &optional buf-name)
  "Create comint buffer and connect to Microsoft SQL Server."
  ;; Put all parameters to the program (if defined) in a list and call
  ;; make-comint.
  (let ((params
         (append
          (if (not (string= "" sql-user))
              (list "-U" sql-user))
          (if (not (string= "" sql-database))
              (list "-d" sql-database))
          (if (not (string= "" sql-server))
              (list "-S" sql-server))
          options)))
    (setq params
          (if (not (string= "" sql-password))
              `("-P" ,sql-password ,@params)
            (if (string= "" sql-user)
                ;; If neither user nor password is provided, use system
                ;; credentials.
                `("-E" ,@params)
              ;; If -P is passed to ISQL as the last argument without a
              ;; password, it's considered null.
              `(,@params "-P"))))
    (sql-comint product params buf-name)))