Re: offer: change SQLConnect to SQLDriverConnect in clsql-odbc
"lisp" <[email protected]> Sat, 26 Nov 2005 22:38:42 +0000
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Yaroslav
> > I am in the process of adding this feature as part of a patch for the
> > ODBC backend to support MS SQL Server... I have it working but need to
> > tidy it up a bit.
Version 3.5.0 now has support for ODBC DSNLess connections through an
extension of the ODBC connection string format. (With thanks to Kevin
for commiting the patch)
* connect - now takes additional keyword parameters for DSNLess
connections using SQLDriverConnect
:connection-string - the raw connection string passed to the driver
:completion - the completion mode for the driver - one of
:no-prompt :complete :prompt :complete-required
:window-handle - the window handle for :prompt mode completion
- if the :connection-string parameter is supplied this takes
precedence over the dsn user and password, the string being passed
to SQLDriverConnect together with the completion required, and,
if necessary a window handle
- the completion defaults to :no-prompt and assumes a complete
connection string is supplied
- the database is *always* named as before using the dsn and user
parameters (we could use the connection string but this can be
lengthy and will usually contain a passwords that should not be
displayed).
- a DSNLess connection to MS SQL Server might look like:
(clsql:connect '("cosmetic dsn name"
"cosmetic username"
"unused password"
:connection-string
"Driver={SQLServer};Server=(local);Database=tempdb;Uid=MyUsername;Pid=MyPassword"
:completion :no-prompt
:window-handle nil))
the :completion and :window-handle parameters could be omitted as
these are the default values
- for an extensive collection of DSNLess connection strings for
databases see http://www.carlprothman.net/Default.aspx?tabid=81
- Dominic