RE: [Zope] ODBC connection to Oracle
We have had mixed results depending on the ODBC driver you use to make your DSN. Here is what I found. 1. Microsofts ODBC Driver for ORACLE on NT4.0, NT2000 -CREATE DSN -OK -ZOPE ZODBC -OK -ZSQL METHODS -OK 2. ORACLE ODBC DRIVER on NT 4.0, Especially NT2000 -CREATE DSN -OK -ZOPE ZODBC CONNECTION -OK Visually! On First Query it will break. -ZSQL METHODS -Broken When in doubt use the MICROSOFT DRIVER for ODBC! That is our rule. You will also find that this same problem exists in using ORACLE drivers when viewing databases via ACCESS. It will typically crash Access and potentially more. Theodore E. Patrick Ishophere.com - Indigo Networks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 01, 2000 12:16 PM To: [EMAIL PROTECTED] Subject: [Zope] ODBC connection to Oracle Hi there, Has anyone tried connecting using ZODBC from a WinNT machine to an Oracle database? The ODBC connection works. But when I create a ZODBC connection from ODBC dsn, it doesn't. I give the connect string as DSN userid password as mentioned under ZODBC add screen... Any help? Thanks Babu http://vsbabu.csoft.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] SECURITY ROLES and < DTML-IN>
I am having trouble rendering a in ZOPE 2.2.0 to any user regardless of roles. I have allocated the proper rights to all objects used and nothing happens. The will not let any user view its contents. I am using an in a DTML Document to render the contents of an SQL_Method from and Oracle Database. There are 3 objects. 1. Database Connection(ORACLE) - Working and can run test. OK 2. SQL_Method(VIEW_METHOD)- Working and can see results when run. SQL: select id, v_id vid, item_name name, url from item The SQL method returns columns: id, vid, name, url as expected. OK 3. DTML Document - Works fine with an IN that renders folder properties. Change the Source of the , , , When used it prompts the user to login - REGARDLESS OF CURRENT LOGIN and returns the following error. Traceback (innermost last): File C:\PROGRA~1\island8\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\PROGRA~1\island8\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\PROGRA~1\island8\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\PROGRA~1\island8\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: view) File C:\PROGRA~1\island8\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: view) File C:\PROGRA~1\island8\lib\python\OFS\DTMLMethod.py, line 167, in __call__ (Object: view) File C:\PROGRA~1\island8\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: view) File C:\PROGRA~1\island8\lib\python\DocumentTemplate\DT_In.py, line 602, in renderwb (Object: view_method) Things I have tried. 1. Opening up security all the way on all objects. Doesn't work. It continues to ask me to log-in. 2. Proxy the DTML Documents ROLE to a higher role for the SQL_METHOD. Fails just as before. Is this a bug? Can anyone else confirm this. PLATFORM: WINDOWS NT 4 ZOPE: 2.2.0 Final Release. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] SECURITY ROLES and < DTML-IN>
Brian, Thanks a ton. The patch worked perfectly! As it turns out I was using ODBC with Oracle. Everything works great. Rendering results perfectly. Thanks for the prompt response. As always! Theodore E. Patrick Ishophere.com -Original Message- From: Brian Lloyd [mailto:[EMAIL PROTECTED]] Sent: Monday, July 17, 2000 10:27 AM To: 'Theodore Patrick'; '[EMAIL PROTECTED]' Subject: RE: [Zope] SECURITY ROLES and < DTML-IN> > I am having trouble rendering a in ZOPE 2.2.0 to any user > regardless of roles. > > I have allocated the proper rights to all objects used and > nothing happens. > The will not let any user view its contents. Theodore - I bet you're running into the same problem as the folks using the ODBC adaptor. I've attached the post I made addressing this a few minutes ago. If this fixes your problem, could you send a note to the zope-list and let the folks there know that the fix works for the Oracle DA too? (I'm going out of town today, so I won't be able to forward it if you only reply to me) Thanks! > Hi guys - > > For those of you (I've mostly heard ODBC adapter users) > having authorization problems with your SQL methods, heres > the scoop: > > Database connections use one of two classes in the > framework for wrapping up result data returned from > queries. One of those classes (that understands results > in RDB format) was missing a required security assertion. > > The results returned by the ODBC adapter were bitten by > this - probably there are other adapters that could > be affected. > > I've attached a patch file for the file: > lib/python/Shared/DC/ZRDB/RDB.py > > ...as well as an updated version of the whole file (since > I know a lot of you will be on Windows w/o patch :) Either > patch or replace the file and restart Zope to fix the > problem. > > This is also checked in for a 2.2.1 release that will > probably happen after a few weeks when enough people > have upgraded to shake out any other problems. > Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML
What is the DTML syntax for nested in statements. Here is an example. EXAMPLE 1: NO VARIABLE PASSING GOAL: loop 4 times and with each loop run the category_method and print out the results: id=&seq=&vid= WORKS! EXAMPLE 2: VARIABLE PASSING GOAL: Loop in the active_category_method and for each row run the category_method passing a new 'id' variable and print out the results. id=&seq=&vid= ERROR --> ID is not being passed to "category_method()" Anyone have a solution out there? NOTE: active_category_method and category_method are SQL METHODS. Where 'id' is and SQL_VAR for category_method. Thanks in advance! Theodore E. Patrick Ishophere.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML
THANKS A TON!!! I just found that the following solutions works also: I think the only difference is the id is evaluated in the namespace variable before invoking the SQL_METHOD id=&seq=&vid= or id=&seq=&vid= Your point on the SQL_METHODS is a good one! I had no idea! Theodore E. Patrick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 20, 2000 1:28 PM To: Theodore Patrick Cc: [EMAIL PROTECTED] Subject: Re: [Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML On Thu, Jul 20, 2000 at 12:27:01PM -0500, Theodore Patrick wrote: > What is the DTML syntax for nested in statements. Here is an example. > > > EXAMPLE 1: NO VARIABLE PASSING > > GOAL: loop 4 times and with each loop run the category_method and print out > the results: > > > > id=&seq=&vid= > > > > WORKS! > > > EXAMPLE 2: VARIABLE PASSING > > GOAL: Loop in the active_category_method and for each row run the > category_method passing a new 'id' variable and print out the results. > > > > id=&seq=&vid= > > > > ERROR --> ID is not being passed to "category_method()" > > > Anyone have a solution out there? > > NOTE: active_category_method and category_method are SQL METHODS. Where 'id' > is and SQL_VAR for category_method. This is FAQ material and should be inserted into either the DTML programmer's guide or the ZSQL Methods guide. It bites everyone who uses SQL methods eventually. ZSQL methods do not perform acquisition, but will look at REQUEST, change it to. id=&seq=&vid= If you have a lot of arguments that need to be captured, you can build a DTML Method, say setup_category_method_parameters that has these builds the REQUEST. Then your dtml can look like: id=&seq=&vid= > > Thanks in advance! > > Theodore E. Patrick > Ishophere.com > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Looking up other row records in an SQLMethod?
Is it possible to look up other SQL record values while iterating through a ? Sample Data returned by SQL Method: ID, ORDER 23, 1 25, 3 34, 6 39, 19 12, 23 Using a I need to get the following during a single pass through the SqlMethod: HEADER >>ID ORDER PREV NEXT PASS 1 >>231null3 PASS 2 >>253 1 6 PASS 2 >>256 319 PASS 2 >>25 19 623 PASS 2 >>25 2319 null Calculating the PREV and NEXT is the problem and this cannot be done via SQL. 1. What is the syntax for writing out SQL Fields Directly? Say in a http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )