[Zope] - Zope/ODBC and MS Sql Server 6.5 connection

Paul Everitt Paul@digicool.com
Thu, 24 Dec 1998 12:13:34 -0500


Instead of picking the ODBC connection from the select list, type in a
connection string in the box below it.  Connection string sytax is
pretty baroque.  Check out Table 1, "Connection String Formats" in the
Aqueduct Manager's Guide.

--Paul

> -----Original Message-----
> From: Vincent Joseph [mailto:vincent.joseph@usa.net]
> Sent: Thursday, December 24, 1998 8:15 AM
> To: zope@zope.org
> Subject: [Zope] - Zope/ODBC and MS Sql Server 6.5 connection
> 
> 
> Hi,
> 
> Has anyone managed to connect to MS SQL Server 6.5 using Zope ODBC?
> The ODBC Data Source Administrator does not have a place where
> you can specify a user/id and password. So selecting the data
> source does not seem to be enough. The clients that I use (isqlw)
> always ask for a userid and password. How do I provide this
> information to Zope, while at the same time using ODBC? When I 
> try to connect it gives me the following message [ec is my data 
> source name]:
> 
> <strong>Invalid connection string: </strong><CODE>ec</CODE><br>
> <!--
> sql.error
> None
> -->
> 
> <!--
> Traceback (innermost last):
>   File C:\Program Files\zope19\lib\python\ZPublisher\Publish.py, line
> 879, in publish_module
>   File C:\Program Files\zope19\lib\python\ZPublisher\Publish.py, line
> 595, in publish
>     (Info: /Plutonia/manage_addZODBCConnection)
>   File C:\Program Files\zope19\lib\python\Products\ZODBCDA\DA.py, line
> 115, in manage_addZODBCConnection
>     (Object: Navigation)
>   File C:\Program 
> Files\zope19\lib\python\Shared\DC\ZRDB\Connection.py,
> line 139, in __init__
>     (Object: RoleManager)
>   File C:\Program 
> Files\zope19\lib\python\Shared\DC\ZRDB\Connection.py,
> line 168, in edit
>     (Object: RoleManager)
>   File C:\Program 
> Files\zope19\lib\python\Shared\DC\ZRDB\Connection.py,
> line 212, in connect
>     (Object: RoleManager)
>   File C:\Program Files\zope19\lib\python\Products\ZODBCDA\db.py, line
> 164, in __init__
> BadRequest: (see above)
> 
> -->
> 
> I got the following from the SQL server books online, and tried both.
> >>A minimum complete SQL Server connection string has one of 
> two forms:
> >>DSN=dsnname;UID=loginid;PWD=password;
> >>DRIVER={SQL Server};SERVER=server;UID=loginid;PWD=password;
> 
> I also tried using the Sybase connection string pattern, to no avail.
> So how do I go about specifying the user id and password to get
> a successful login when using ODBC?
> 
> Help would be much appreciated.
> 
> Thanks in advance,
> 
> Vincent
> 
> --
> 
>