[Zope-dev] using SybaseDA to connect to MS SQL

Neil K NeilK@ActiveState.com
Fri, 8 Dec 2000 13:31:19 -0800


Thanks to everyone for their assistance yesterday. I feel like I'm really
close to making this work now, but I can't get the Product to connect. I
always get "Invalid connection string".

One thing that puzzles me is the distinction between 'Server' and
'Datasource'.
If Datasources are what we're defining in the interfaces file, that looks a
whole lot like Server. I've seen PHP help pages dealing with these Sybase
libs and MSSQL; somehow they only need to specify user, password, and
database.

TIA for any assistance you can offer.



What I've done:
----------------
I have successfully compiled the SybaseDA product, with Sybase libs, etc,
set SYBASE and LD_LIBRARY_PATH environment variables in Zope startup.

As far as I know, I have created a valid 'interfaces' file. It looks like
this:

spindler
        master tcp eth0 xxx.xxx.xxx.xxx 1433
        query tcp eth0 xxx.xxx.xxx.xxx 1433

where spindler is the hostname of my computer, xxx.xxx.xxx.xxx is the
dotted-quad of my sql server. On the windows side, the SQL Server has
Network Utility on, port 1433.
(it refers to itself as SPINDLER, does case matter?)

I created a test database with user/passwd and so on.



The output I get upon connection:
----------------------------------
Invalid connection string: database: quux, password: xxxxx, server:
spindler, transactional: Y, user: neilk


Traceback (innermost last):
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
    (Object: manage_adddcSybaseConnection)
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
    (Object: manage_adddcSybaseConnection)
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/Products/SybaseDAv2/DA.py,
line 100, in manage_adddcSybaseConnection
  File
/home/neilk/Zope/Zope-2.2.4-src/lib/python/Shared/DC/ZRDB/Connection.py,
line 132, in __init__
    (Object: RoleManager)
  File
/home/neilk/Zope/Zope-2.2.4-src/lib/python/Shared/DC/ZRDB/Connection.py,
line 161, in edit
    (Object: RoleManager)
  File
/home/neilk/Zope/Zope-2.2.4-src/lib/python/Shared/DC/ZRDB/Connection.py,
line 240, in connect
    (Object: RoleManager)
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/Products/SybaseDAv2/db.py,
line 147, in __init__
  File /home/neilk/Zope/Zope-2.2.4-src/lib/python/Products/SybaseDAv2/db.py,
line 306, in _error
BadRequest: (see above)

--
Neil Kandalgaonkar, ActiveState