<title>Connection Specification</title>
<sect3>
<title>Syntax of connection-spec</title>
- <synopsis>(<replaceable>dsn</replaceable> <replaceable>user</replaceable> <replaceable>password</replaceable>)</synopsis>
+ <synopsis>(<replaceable>dsn</replaceable> <replaceable>user</replaceable> <replaceable>password</replaceable> &key <replaceable>connection-string</replaceable>)</synopsis>
</sect3>
<sect3>
<title>Description of connection-spec</title>
use for authentication.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>connection-string</parameter></term>
+ <listitem>
+ <para>Raw connection string passed to the underlying
+ ODBC driver. Allows bypassing creating a DSN on the
+ server.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect3>
</sect2>
</itemizedlist>
</sect3>
</sect2>
+ <sect2><title>Connect Examples</title>
+ <screen>
+
+;; assumes a "mssql" DSN is configured on the lisp host, specifying database server
+;; and database name.
+> (clsql:connect '("mssql" "database-user" "database-password")
+ :database-type :odbc)
+=> #<CLSQL-ODBC:ODBC-DATABASE mssql/database-user OPEN {100756D123}>
+
+;; no DSN on the lisp host, specify connection information via :connection-string
+> (clsql:connect '("friendly-server-name" "friendly-username" ""
+ :connection-string "DRIVER={FreeTDS};SERVER=mssql-server;DATABASE=database-name;UID=database-user;PWD=database-password;PORT=1433;TDS_Version=8.0;APP=clsql")
+ :database-type :odbc)
+=> #<CLSQL-ODBC:ODBC-DATABASE friendly-server-name/friendly-username OPEN {100756D123}></screen>
+ <para>
+ The <symbol>friendly-server-name</symbol>
+ and <symbol>friendly-username</symbol> are only used when
+ printing the connection object to a stream.
+ </para>
+ </sect2>
</sect1>
<sect1 id="aodbc">
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
- <para>String representing the filename of the &sqlite;
- database file.</para>
+ <para>String or pathname representing the filename of
+ the &sqlite; database file.</para>
</listitem>
</varlistentry>
</variablelist>