help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple SQLi buffers? (Emacs 24.0, sql-mode 2.5)


From: Tim X
Subject: Re: Multiple SQLi buffers? (Emacs 24.0, sql-mode 2.5)
Date: Wed, 08 Dec 2010 15:25:38 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Wayne S <wstewart@marchex.com> writes:

> WS> I upgraded emacs 20.3 to 20.4 (from emacs.orebokech.com).  I then
> WS> ...
>
> Whoops!  Make that emacs 23.x -> 24.0.

Note that there has been a number of changes in the sql-mode bundled
with emacs 24. In particular, MySQL connections can now use a port and
hyou can define multiple connection 'names'. 

My guess would be that these changes have affected that old behavior. It
could well be a bug or it could be that a different procedure is now
required to do what you want. One way to work around the problem could
be to define different connection names for connecting to the same
database and see if that works. 

I would recommend logging a bug report. Either it is a bug or a new
procedure has been adopted. In either case, logging the bug report will
highlight the bug or a lack of clarity in documentation if a new
procedure is now required. 

Check the NEWS file. In particular, 

*** Added ability to login with a port on MySQL.
The custom variable `sql-port' can be specified for connection to
MySQL servers.

*** Added `sql-connection-alist' to record login parameter values.
An alist for recording different username, database and server
values.  If there are multiple databases that you connect to the
parameters needed can be stored in this alist.

For example, the following might be set in the user's init.el:

  (setq sql-connection-alist
        '((dev (sql-product 'sqlite)
               (sql-database "/home/mmaug/dev.db"))
          (prd (sql-product 'oracle)
               (sql-user "mmaug")
               (sql-database "iprd2a"))))

This defines two connections named "dev" and "prd".

*** Added `sql-connect' to use predefined connections.
Sets the login parameters based on the values in the
`sql-connection-alist' and start a SQL interactive session.  Any
values specified in the connection will not be prompted for.

In the example above, if the user were to invoke M-x sql-connect, they
would be prompted for the connection.  The user can respond with
either "dev" or "prd".  The "dev" connection would connect to the
SQLite database without prompting; the "prd" connection would prompt
for the users password and then connect to the Oracle database.


-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]