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

2000-12-08 Thread Neil K

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: x, 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



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Linux Zope - Win2K SQL Server?

2000-12-07 Thread Neil K


I'm still trying to figure out what the missing pieces are... if anyone else
has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would
appreciate some guidance.

It seems I would have to write my own Product from scratch to do this, no
matter what. None of the ODBC Products seem to be available for Unix, and
ODBC from Unix - Windows will require additional software like EasySoft's
ODBC Bridge anyway. Or I could just not use ODBC at all and make some
Product customized to MS SQL Server.

Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy.
:)  It's a possibility, but I'd like to see if more conventional solutions
exist.

--
Neil Kandalgaonkar, ActiveState



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] REQUEST in id causes errors

2000-11-08 Thread Neil K

Any id with 'REQUEST' in it cannot be edited or viewed. If you don't believe
me, try it out yourself. In my case, I *need* a URL named
'BIG_REQUESTS.html' -- it's a Zope-based mirror of content from somewhere
else.

This fixes it:

/lib/python/ZPublisher/BaseRequest.py:
243c243
 if find(path, '/REQUEST/') = 0:
---
 if find(path, 'REQUEST') = 0:


I'm not sure if I did quite the right thing here... are delimiters always
slash? should we also check if the URL terminates in "/REQUEST"? What about
cgi parameters named 'REQUEST'?

Zope gurus, your comments please?

--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




RE: [Zope-dev] REQUEST in id causes errors

2000-11-08 Thread Neil K

D'oh. The diff I posted was backwards. I assume you all got the general
idea.

With more context:

*** C:\Documents and Settings\neilk\My Documents\BaseRequest-old.py Wed Nov
08 12:21:32 2000
--- lib\python\ZPublisher\BaseRequest.pyWed Nov 08 12:22:05 2000
***
*** 242,244 
  # Make sure that REQUEST cannot be traversed.
! if find(path, 'REQUEST') = 0:
  return response.notFoundError(path)
--- 242,244 
  # Make sure that REQUEST cannot be traversed.
! if find(path, '/REQUEST/') = 0:
  return response.notFoundError(path)


--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] calling dtml method with same name up the hierarchy.

2000-11-06 Thread Neil K

I'd like to be able to nest footers and headers.

The thing I would expect is to have a standard_html_footer DTML method in
the root, then be able to have standard_html_footers in subfolders which add
their stuff, then call the root one.

like:

/standard_html_footer:
   (c) 2000 Warner Brothers

/merrie_melodies/standard_html_footer:
   That's all folks!
   dtml-var standard_html_footer


Of course this causes infinite recursion now. So is there a decent way to
explicitly call the "super" standard_html_footer, without renaming files or
copying data in multiple places?

--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] symlink product?

2000-10-12 Thread Neil K

[EMAIL PROTECTED] wrote:
In order to make Shane's Symlink product (soft links to objects based on

Symlink product? Where can I find out more? I don't see anything in Shane's
member folder or by searching Zope.org.

I have written a Shortcut product myself. (It was fairly primitive so I
didn't have the heart to call it a symlink :)

--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] intersection of ZCatalog queries on the same index

2000-10-05 Thread Neil K


If there a way to get ZCatalog to give me intersections of results on a
single index? All the examples and tutorials I've seen are union (OR)
queries.

Basically I just want ZCatalog to give me items where keywords contained
both 'foo' and 'bar'.

I have browsed through Catalog.py and it seems like it might be possible.
Disclaimer, I'm pretty new to Zope  python.

--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




RE: [Zope-dev] intersection of ZCatalog queries on the same index

2000-10-05 Thread Neil K

Michel Pelletier [EMAIL PROTECTED] wrote:

 Catalog.searchResults({'food', ['foo', 'bar']})
   ^
I think you meant a : there?  
 

 would find all of the objects whose food property contained both 'foo'
 _and_ 'bar'.
   
This is not returning the intersection but the union. At least for me.

On the other hand, full-text searches appear to handle a phrase 
like 'foo and bar'. 

--
Neil Kandalgaonkar  [EMAIL PROTECTED]
Web Application Developer, ActiveState

 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )