Re: [Zope] MySQL and Zope struggles
You can do it with temporary tables. Like this- create temporary table foo ( note_id int, notes varchar ); insert into foo select Note.note_id, Note.notes from Note, Artist where Note.note_id=Artist.note_id and Artist.artist_id=23; update foo set notes="asdlfna"; replace into Note select note_id, notes from foo; This does assume that the note_id is unique. You may also need to explicitly drop foo, because it goes away when you disconnect, but of course Zope holds connections open. !!! However -- now that I think of it... you can just do: replace into Note select note_id, "New Note" from Artist where artist_id=23; Of couse, this will change all notes for an artist, so it assumes the artist_id is unique as well. (Which I would assume it is from your model.) If you need more complex things, look into temporary tables, but the MySQL extension (like replace) do allow you to do fun things. Hope this helps, Monty Richard Moon wrote: Nice idea. Trouble is the note table is used to hold notes for many different reasons, so it looks like this - --- | Artist| | Recording | | Label | etc. --- | artist_id | |recording_id| |label_id| | note_id | |note_id | |note_id | --- | || | | - | -- | Note | -- | note_id | | notes| -- It looks as if there wasn't anything I was missing - I'm just going to have to break the code up into separate SQL Methods. The example I gave was quite simple compared to some of the updates I have to deal with. Thanks anyway. At 17:40 16/10/00, you wrote: Or you could renormalize your data to have: - --- | Artist | | Note | |-|---|---| | id | | id| -| artist_id | | note_str | --- you now have a list of notes by artist_id. You typically won't have a screen that doesn't have an Artist context to be adding a note to. (or to remove all notes from). Of course this means more work to migrate :-( And I don't know all possible scenarios for which you would need the structure you gave, but it is another way around this. It probably doesn't solve real complex scenarios either. JAT Dale Richard Moon [EMAIL PROTECTED] ___ 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 )
Re: [Zope-dev] MySQL : help !
I can send you one, but if building it is giving you lots of problems, you may have larger problems, and the _mysql I send may not really help. Building should be sort-of straight forward. What version of ZMysqlDA are you using? What version of Mysql? What errors are you getting? [EMAIL PROTECTED] wrote: I need the binarie file named _msql does anybody got it (for any Linux)? Because I can't build this file : I've got too many errors Thanks in advance Jérôme DIEBOLD ___ 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 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] Shared Libraries and Persistent Objects
Hey guys, I've got a question about how Zope deals with shared libraries. Say I have a 2Meg shared library that I've generated with SWIG. (I know it's big, but for sake of argument) Say then that I create a Python Class that imports this library and provides a front-end for each of its exported methods. Then, I instantiate this class 2000 times within a Zope instance. My question is, the library code is loaded into memory once, right? That seems to be what should happen, but I want to make sure before I start selling people here on SWIGing a few utilities and bundling them into one of our Zope objects instead of doing fork/execs to call an executable. I'm not shifting the burden from loading time to storage size, am I? Thanks, Monty ___ 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] ZSQL Methods from Python?
Hey, is there any doco about using ZSQL Methods from Python Products? Also, does anyone know of any work done to extend ZSQL Methods to allow stored-procedure calls? I know I can do an Oracle Procedure call from DCOracle that returns a cursor, but I'd love to combine that with the caching/pluggable brains of ZSQL Methods. Is there anything out there on this or am I going to have to roll my own? Thanks, Monty ___ 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] ZSQL Methods from Python?
Jim Fulton wrote: Monty Taylor wrote: Also, does anyone know of any work done to extend ZSQL Methods to allow stored-procedure calls? No, but I'd love to see someone tackle it. The semantics of stored procedures varies so widely accross databases, that I doubt that it would be easiliy generalizable. I think, at least for starters, a form of stored procedure support for Oracle would make alot of sense. I know I can do an Oracle Procedure call from DCOracle that returns a cursor, but I'd love to combine that with the caching/pluggable brains of ZSQL Methods. Is there anything out there on this or am I going to have to roll my own? I think you'd have to roll your own. If you want to do something reusable that other people could use, I'd be happy to provide whatever advice and support I can. I think I'd like to talk to you about this. We're about to work on transitioning a web-based product to Zope, and we use Store Procedures exclusively. I'd love to have the extra ZSQL goo instead of having to wrap the code at such an individual level. Maybe we can stick someone on the task. But I'm sure we'll need a guiding hand or two. All of this assumes I can get past the basic problem that follows... Note that one of the things I like about Oracle's stored procedures is that they allow me to avoid screwing with cursors in the common case that I'm getting one row of data. I can just get the data I need through a straight function call. The DCOracleStorage uses stored procedures almost exclusively. I've been looking through that code (we've started using DCOracleStorage on the backend.) For some reason, though, I can't get the stored procedure stuff to work like you do. Check out the following: Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Production SQL desc pgm140_api; PROCEDURE SELECT_TARGETS Argument Name TypeIn/Out Default? -- --- -- PP_NAMEVARCHAR2IN PP_RESULT REF CURSOR IN/OUT RECORD IN/OUT AMSM_IDNUMBER(12) IN/OUT NAME VARCHAR2(80)IN/OUT PROCEDURE SELECT_TECHNOLOGIES Argument Name TypeIn/Out Default? -- --- -- PP_CATEGORYVARCHAR2IN PP_RESULT REF CURSOR IN/OUT RECORD IN/OUT ET_ID NUMBER(12) IN/OUT NAME VARCHAR2(80)IN/OUT * Then from python, with the same connection string, I do: Python 1.5.2 (#1, Feb 14 2000, 18:27:27) [GCC 2.95.1 19990816 (release)] on sunos5 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam import DCOracle.oci_ conn=DCOracle.Connect('') pgm140_api=getattr(conn.procedures,'pgm140_api') sql_select_targets=getattr(pgm140_api, 'select_targets') Traceback (innermost last): File "stdin", line 1, in ? File "/apps/zope/lib/python/Products/ZOracleDA/DCOracle/ociProc.py", line 324, in __getattr__ oci.error: no usable procedure named pgm140_api.select_targets I've tried using all caps on one or both as well to no avail. Any thoughts? Monty ___ 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] Re: MySQL Transaction Support
Good point. It still irks me to have two DA's though. It gets confusing enough with the three different DA's running around now, much less if one of them actually had two valid versions. What if we had two classes like you said, but then in the manage_addForm had a checkbox for Transactions enabled, which would determine which Class got instantiated? Any good reasons why that shouldn't work? Monty Andy Dustman wrote: On Tue, 1 Aug 2000, Monty Taylor wrote: A question would be, what should the commit/rollback mechanism decide to do when the transaction deals with tables of both types. It should raise ProgrammingError, "You're screwed". If you need transactional capabilities, then you just can't mix transactional and non-transactional tables in MySQL. This is also why I think there need to be two Zope DAs for MySQL: Non-transactional and transactional, the latter being a simple subclass of the former with TM support mixed-in. The choice of whether or not to be transactional should be made by the application designer; it's too complicated to make at run-time (i.e. for each query). Even if you can use the API to find the table type, you stil have to figure out what tables are used by the query, and that requires parsing SQL. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ 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] ZOracle LOB Questions
Is anyone working on fixing DCOracle? I'll have someone look into if no one else is, but I'd prefer to spend the energy elsewhere if it's already being addressed. (The LOB support would be nice for me as well.) "Matthew T. Kromer" wrote: Alexander Schad wrote: Alex, Oracle 8i broke DCOracle's support for LOBs; DCOracle primarily uses OCI 7 (Oracle 7) calls, and Oracle 8i enforces a restriction that OCI 8 objects cannot be used in the context of an OCI 7 statement. You can use Oracle 8.0 for this, the restriction isn't enforced until Oracle 8.1. Hello! thank you for your answer. but does that mean that i can only use LOBS with Oracle 8.0 ? i'm confused. i need to use LOBs. if i use oracle 8.1 can i use LOBS and if yes which Databse adapter do i need? If your database adapter is 8.0 you can probably use LOBs, if the adapter is 8.1 you probably can't. I never mix and match adatpters vs. databases, though, so your mileage my vary. By this I mean, you could use 8.0 libraries to access an 8.1 database via SQL*NET. I *think* the error is actually being raised at the library level, not the server itself. ___ 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 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] [Zope] App isolation
I'm fairly sure there's already a Zope COM interface, and I know Zope can do xml-rpc. And SOAP support is coming. So I would suggest building it as an XMLRPC or SOAP server, and then use the Zope client functionality already there to connect to it. I wouldn't do COM because I'm an Open Source bigot. Monty Jacques Exelrud wrote: Not sure if this list is the best place to put such question but here it is... I need to develop what would be a product if only Zope was the target. As it´s not I was thinking what could I do to not need to build such app twice: I came to 2 options both involving building a server of some kind and using Python to connect to this server. 1st Build the app as a COM server (the target OS is Windows) and using Python support build an interface to this COM server as a Zope product 2nd Build the app as a XMLRPC server and using Python support build an interface to this XMLRPC server The second options is better because I´m not attached to any platform but, as I said, that´s not an issue right now. Good options would be having a JVM running "inside" Zope so that jave objects could be accessed by it or SOAP Zope support beeing ready... Any sugestions on any of those or a 3rd option ? Thanks in advance, Jacques ___ 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 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] ZSQL Question
Let me preface this by saying: this is an untested guess. I don't have Access around anywhere to play with. But, my guess would be that since you're connecting using ODBC, you'll have to use standard SQL wildcards instead of Microsoft extensions. So try select * from SomeTable where SomeField like '%project%' Monty Original Message On 7/12/00, 6:51:31 AM, Daniel Sashko [EMAIL PROTECTED] wrote regarding [Zope-dev] ZSQL Question: Hello, is there a way in Zope to search on the pattern of the field in the database?? for example:: through ZODBC using ZSQL connected to ACCESS database I have a query that goes like this: select * from SomeTable where (SomeField Like '*project*') If I run this SQL in ACCESS directly it returns all the records where the field SomeField has the word "project" anywhere in the text... but when I run it through the ZSQL I get nothing in return. Is there another key word to be used with ZSQL or is it just imposible to query on the patterns What's weird, the ZSQL does not choke on the "Like" word... it just says that there was no data matching the query... any one has any ideas? ___ 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 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] Q: Zope meeting in Paris in August?
I'm there, just let me know when and where. Monty Original Message On 7/11/00, 3:40:08 PM, Paul Everitt [EMAIL PROTECTED] wrote regarding [Zope] Q: Zope meeting in Paris in August?: Hello everybody. I'm chatting with someone in Paris about a possible Zope gathering during my vacation to see my in-laws August 11th-25th. I'll be in Paris for a few days in the beginning and possibly at the end. Is anybody interested in hosting an event? I'll be in Brittany the rest of the time, so if there's someone in Rennes or Nantes, that's possible as well! --Paul Paul Everitt Digital Creations [EMAIL PROTECTED] 540.371.6909 - The Open Source Zope application server http://www.zope.org/ - ___ 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 )
Re: [Zope] Calling Stored Procedures using DCOracle
I have **exactly** the same problem. I've tried 8.1.5 and 8.1.6. I would LOVE any help anyone could give. Monty Original Message On 7/6/00, 9:47:09 AM, Ronnie Sengupta [EMAIL PROTECTED] wrote regarding [Zope] Calling Stored Procedures using DCOracle: Hi, I am using DCOracle Ver 1.3.1 1b1. Connected to Oracle Ver 8.1.6. When I execute this : conn.callproc('addarticle',['dfdsf']) I get the following Error : __getattr__ raise error, 'no usable procedure named '+name oci.error: no usable procedure named addarticle How ever if I do this : conn.getSource('ADDARTICLE') It returns the source code. In short I need to run my stored procedures from python. They are all ready and waiting to be used. Some one help me :-) Regards, Ronnie [EMAIL PROTECTED] ___ 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 )
RE: [Zope] Calling Stored Procedures using DCOracle
Here's what happenes from me. You can see from the getSource on PGM140_API that the procedure exists within called select_targets. I can't get anything to recognize it. Help? dbc.getSource('PGM140_API.SELECT_TARGETS') '' dbc.getSource('PGM140_API') 'PACKAGE PGM140_API IS\012-- PL/SQL Specification\012type asms_record is record\012 (amsm_id assoc_masters.asms_id%type\012 ,name assoc_masters.name%type\012 );\012\012 type asms_cursor is ref cursor return asms_record;\012\012 procedure select_targets\012 (pp_namein varchar2\012 ,pp_result in out asms_cursor);\012\012/* select targets by name\012 pp_name defines the search argument - it makes no difference if this is uppercase or lowecase\012 pp_result returns result\012*/\012\012 type technology_record is record\012 (et_id emerging_technologies.et_id%type\012 ,name emerging_technologies.name%type\012 );\012\012 type technology_cursor is ref cursor return technology_record;\012\012 procedure select_technologies\012 (pp_categoryin varchar2\012 ,pp_result in out technology_cursor);\012\012\012END PGM140_API;\012' dbc.getSource('SELECT_TARGETS') '' dbc.getSource('PGM140_API.select_targets') '' Original Message On 7/6/00, 2:32:39 PM, Satheesh Babu [EMAIL PROTECTED] wrote regarding RE: [Zope] Calling Stored Procedures using DCOracle: Did you try conn.callproc('ADDARTICLE',['dfdsf']) ? As far as I know Oracle stores the object names in upper case in the data dictionary. ~ V.Satheesh Babu [EMAIL PROTECTED] . . http://vsbabu.csoft.net/ /V\ - Duct tape is like the force. It has // \\ a light side, and a dark side, and /( )\ it holds the universe together ... ^'~'^ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ronnie Sengupta Sent: Thursday, July 06, 2000 3:47 AM To: [EMAIL PROTECTED] Subject: [Zope] Calling Stored Procedures using DCOracle Hi, I am using DCOracle Ver 1.3.1 1b1. Connected to Oracle Ver 8.1.6. When I execute this : conn.callproc('addarticle',['dfdsf']) I get the following Error : __getattr__ raise error, 'no usable procedure named '+name oci.error: no usable procedure named addarticle How ever if I do this : conn.getSource('ADDARTICLE') It returns the source code. In short I need to run my stored procedures from python. They are all ready and waiting to be used. Some one help me :-) Regards, Ronnie [EMAIL PROTECTED] ___ 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 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-dev] Fwd: [Zope-PTK] Area based roles?
Original Message On 7/4/00, 12:45:29 PM, Monty Taylor [EMAIL PROTECTED] wrote regarding [Zope-PTK] Area based roles?: Hi all. I've got an idea of something I'm trying to implement, and I'm wondering if the concept is of use to anyone else. I've got an Intranet up in PTK. (What a shock, as I'm posting here. :) ) I'm slowly getting people to use it for internal collaboration, et al. But the main things people are wanting to do are internal to their own department, with some overlap. So you've got: +PTKRoot | +-Members | +-John | +-Sue | +-Marketing +-Technology Say John is in Technology and Sue is in Marketing. What I want is for John to have Contributor rights in the context of Technology, and Sue in Marketing, i.e. John adds a News Item and Publishes it. It shows up in Technology but not Marketing. I thought about creating a Technolgy Item ("Release Notes") and a Marketing one ("Press Release") and then just having a catalog search on the meta-type of each in the appropriate folder's index_html and give them all Contributor. But that strikes me as unclean. It would be nice to have anyone be able to create a Press Release or Release Notes, but only have them published in their department's context, and merely pending in others. Am I making any sense at all? Does anyone see either a need for doing this or a way to do it? If it requires changes to PTK core, would anyone be interested in those, or should I throw them in my pile of dirty little secrets that no one should really know exist? Thanks, Monty ___ Zope-PTK maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-ptk See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests ___ 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] Re: [Zope-PTK] Roles, Groups, Security and Group Membership
Original Message On 7/4/00, 1:22:04 PM, Chris Withers [EMAIL PROTECTED] wrote regarding [Zope-PTK] Roles, Groups, Security and Group Membership: Monty Taylor wrote: Am I making any sense at all? Does anyone see either a need for doing this or a way to do it? If it requires changes to PTK core, would anyone be interested in those, or should I throw them in my pile of dirty little secrets that no one should really know exist? You're making perfect sense and I think it's a Zope problem partly, and also a PTK problem. Good point. I think as ZEO becomes more prevelant and Zope wants to compete in the realm of big systems, group based interaction could serve to iron some things out. The Zope problem is that Zope security has no idea about Groups. As in Users/Members exist There may have roles They may also be members of Groups. Groups may also be members of Groups. Groups may also have roles associated with THEM. Other major security systems I can think of (LDAP, Unix, NT, Notes) all have this concept but Zope does not :( Should this part of the discussion be moved to zope-dev? Probably so. I've forwarded the original email there and I'm sending this one to zope-dev. Any comments from the zope-dev world? Monty ___ 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] ZEO Replication/Cache
I just installed an instance of ZEO Storage Server with a client on the same machine and a client on a different machine. So far, it seems to work reasonably well, with one exception. None of the changes I've made on one client seem to propagate to the other client unless I restart the other client. This can't be the intended modus operendi. Have I missed something obvious, or is the proactive notification from server to client not implemented yet? Monty ___ 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] MySQL transaction support (was: MySQL Select Statements)
Original Message On 7/4/00, 12:47:07 AM, Andy Dustman [EMAIL PROTECTED] wrote regarding Re: [Zope] MySQL transaction support (was: MySQL Select Statements): Note also: With non-transactional databases, you would expect to get better performance by having several open connections which are not shared. In the case of MySQL, each connection has it's own server thread, and this can exploit CPUs, if available. However, connections should not be shared on transactional databases, because transactions are tied to a connection, and not a cursor. Even if there is a mutex to keep multiple threads from executing queries simultaneously on the same connection, the transactions are going to be whacky. Oracle is obviously transactional. Does anyone know how it handles connection pooling? I'll look and see it I can figure it out, but I'd love it if someone already knew... Monty ___ 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-dev] Product Data Storage
Just my $0.02 worth... If you can at all avoid it, I think you should find a way to store it in the ZODB. Maybe a Configuration product that would allow you to create arbitrary configuration information and still be able to access it without making filesystem calls. Think about DC's Zope on a CD demo. Not that you really need to do that sort of thing, but it's really not going to work if you have to write stuff to the filesystem. Actually, an XML Docment somewhere at root level should give you the kind of flexibility you're looking for. Lot's of people are using XML files for conf these days (they're all jumping... don't you want to...) That being said, I totally agree that if you need to store something in a file, put it in Zope/var. I, for one, have my Zope application code on partition along with other apps, and the data, like Data.fs on another. I typically don't expect the apps partition to grow very much, or very often, In fact, only when I install something. So it would be quite shocking to have that space filling unexpectedly. But, as always, the choice is completely up to you. Monty Original Message On 6/30/00, 3:27:42 PM, Dan "L." Pierson [EMAIL PROTECTED] wrote regarding [Zope-dev] Product Data Storage: Andy Dawkins writes: I have decided AGAINST searching the ZODB for instances of ZMailIn because that is just too scary, hideously inefficient and I don't want to go there. Instead I thought of keeping an up-to-date list of where all the current instances where held. My original idea was to get the ZMailIn product to write a file in to the /lib/python/Products/ZMailIn directory, which shouldn't cause any problems that I can see. ... snip ... So my question is this: What are peoples opinions on storing shared product data? Where should it be placed? Should this ability be added to Zope as a standard? Shared data should go in zope/var, or a subdirectory of that. Zope/lib should be considered read-only by running products unless explicitly changed by the user. As you have correctly pointed out, lots of machines share Zope installations for multiple servers. A standard interface for Python code to get a private subdirectory of var might well be useful. ___ 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 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] MySQLDA Problems with simple constant/function queries
This is actually fixed in both 1.1.4 and in 1.2.0. The problem has to do with type conversions from a dictionary in the adapter. Any type of non-row function or aggregate returns a type of 'unhandled' which was not mapped in the conversion dictionary. This is fairly much the bug that called for 1.1.4 to be released. You're right, though, very easy to fix. 1.2.0 deals with the problem by taking a different approach to type-mapping. Monty Stefan Franke wrote: I'm using MySQLDA 1.1.3 on Win32. When I type the following queries into the test tab edit box, I get the traceback below: select LAST_INSERT_ID() or select 1 from table Of course "select * from table" works. When I look into db.py, the error doesn't look very hard to fix, I think I'll give tomorrow. Is there some API documentation of what a DA is supposed to do? Since the 1.1.4 query() code is identical, I think the problem appears there as well. Please reply to the posting via email directly, since I'm not subscribed to the list. Stefan www.meso.net --- Error Type: KeyError Error Value: unhandled Traceback (innermost last): File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line 224, in publish_module File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line 189, in publish File D:\Programme\Zope2.2\mensa_m\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line 175, in publish File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_test) File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_test) File D:\Programme\Zope2.2\mensa_m\lib\python\Shared\DC\ZRDB\Connection.py, line 178, in manage_test (Object: RoleManager) File D:\Programme\Zope2.2\mensa_m\lib\python\Products\ZMySQLDA\db.py, line 191, in query KeyError: (see above) ___ 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 ) begin:vcard n:Taylor;Monty tel;cell:+31 (0)6 200 17486 tel;fax:+31 (0)20 589 5566 tel;work:+31 (0)20 589 5517 x-mozilla-html:TRUE url:http://www.goldridge.net org:Information Innovation adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands version:2.1 email;internet:[EMAIL PROTECTED] title:Information Artist x-mozilla-cpt:;0 fn:Monty Taylor end:vcard
Re: [Zope] problem with the beta
It has to do with the new security model. The supuser can no longer own stuff. Monty Original Message On 6/26/00, 3:31:02 PM, frank cuzzocrea [EMAIL PROTECTED] wrote regarding [Zope] problem with the beta: i am using 2.2 Beta 2 and every time i attempt to add a new folder, or a dtml document, i keep having this error Error Type: SuperCannotOwn Error Value: Objects cannot be owned by the superuser I never got this with 2.1.6 is this an error in the 2.2 beta 2 version, or do u think i just have a bad copy. i am going back to the 2.1.6 version till i find out Frank from Miami ___ Visit http://www.visto.com/info, your free web-based communications center. Visto.com. Life on the Dot. ___ 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 )
Re: [Zope] Zope 2.2 beta 2 released
http://www.zope.org/Members/mordred/ZMySQLDA "T.J. Mannos" wrote: Monty, I can't find 1.2.0. I run a search for MySQL and all that comes up is MikeP's version 1.1.3. Come to think of it, I have no idea where I found 2.0.0, either. I think it was on a Zope news announcement for a while then disappeared. Anyway, could you send me the URL to 1.2.0? Thanks, T.J. - Original Message ----- From: Monty Taylor [EMAIL PROTECTED] To: T.J. Mannos [EMAIL PROTECTED] Cc: IPM Return requested Receipt notification requested [EMAIL PROTECTED] Sent: Friday, June 23, 2000 1:53 AM Subject: Re: [Zope] Zope 2.2 beta 2 released Well, I'm not sure why you would need to change versions as I haven't done any testing of ZMySQLDA on the 2.2 Beta release, but I would suggest downloading and installing ZMySQLDA 1.2.0. Andy's version, 2.0.0, isn't published because he doesn't really want to provide support right now. He does have some things in there that I want to migrate into the current line, and I've already included his changes to use the new backend module. So I can help you out a bit more if you use 1.2.0. But that's your call. I'll see what I can find out in any case, just as soon as I install a 2.2 server somewhere. begin:vcard n:Taylor;Monty tel;cell:+31 (0)6 200 17486 tel;fax:+31 (0)20 589 5566 tel;work:+31 (0)20 589 5517 x-mozilla-html:TRUE url:http://www.goldridge.net org:Information Innovation adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands version:2.1 email;internet:[EMAIL PROTECTED] title:Information Artist x-mozilla-cpt:;0 fn:Monty Taylor end:vcard
Re: [Zope] Problems reverting from Zope 2.2
Sounds like you didn't get everything when you reverted. Make sure that you replace everything in the lib/python tree. Remember that MailHost and ZCatalog live in Products, so if you replaced everything but saved the Products dir so you wouldn't have to re-install your products, you might want to check through that stuff as well. Monty "Jay, Dylan" wrote: After installing 2.2b1 and finding it doesn't work well enough yet I tried to revert back to 1.1.7 This seemed to work ok except somethings are broken in the control_panel. MailHost and ZCatalog can't be accessed Clicking on them in the control_panel results in a resource not found error. This is ok except I can't delete other product which rely on these products. How do I get out of this mess? ___ 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 ) begin:vcard n:Taylor;Monty tel;cell:+31 (0)6 200 17486 tel;fax:+31 (0)20 589 5566 tel;work:+31 (0)20 589 5517 x-mozilla-html:TRUE url:http://www.goldridge.net org:Information Innovation adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands version:2.1 email;internet:[EMAIL PROTECTED] title:Information Artist x-mozilla-cpt:;0 fn:Monty Taylor end:vcard
Re: [Zope] ZPatterns 0.3.0
If you're running from the RPM install, I believe it puts the Components dir somewhere else. (Can't remember, though) For what it's worth... Monty Peter Simmons wrote: Hi Guys, I was trying to setup ZPatterns 0.3.0 and I got up to making the extension DynPersistc. I had run "make -f Makefile.pre.in boot" and then I ran "make" but an error occured saying that ExtensionClass.h couldn't be found. If anyone knows what is wrong I would much appreciate it. The only other thing I can tell you (and I don't know if it means anything) is that it seemed to be looking for ExtensionClass in teh Zopeinstall/lib/Components dir and there is no Components dir there, perhaps I need to add something to my Zope install. Cheers, Pete ___ 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 ) begin:vcard n:Taylor;Monty tel;cell:+31 (0)6 200 17486 tel;fax:+31 (0)20 589 5566 tel;work:+31 (0)20 589 5517 x-mozilla-html:TRUE url:http://www.goldridge.net org:Information Innovation adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands version:2.1 email;internet:[EMAIL PROTECTED] title:Information Artist x-mozilla-cpt:;0 fn:Monty Taylor end:vcard
Re: [Zope] ZOracle connection trouble
The user/passwd@SID is the correct format. Zope, however, probably has no clue about your environment variables. I would recommend looking at the start-up script for Zope and adding the environment variables in there (ORACLE_HOME is quite important, for one.) Monty "Bak @ kedai" wrote: hullo everybody, i want to access data on oracle server that resides on a remote machine. i've installed oracle 8i(client side only) for linux on a redhat6.2 and managed to compile ZOracleDA with no problems. i can connect ok from sqlplus and the test script that comes with ZOracleDA can import and connect to the remote database server OK. however, i can't create a ZOracleDA connection. what's the connection string? i've tried user/passwd@myora_SID - this barfed out connection "Invalid connection string: emedia/emedia123@nstdb" user/passwd crashed zope. i think my environment is all set since i can connect from sqlplus and the ZOracleDA test script runs ok. what more should look at? pointers/docs accepted. p/s - i'm a Oracle newbie and not the DBA for the server that i want to access. i d/l DCOracleDA, compiled it, ran the test script successfully and stopped at that since i'm not quite sure what to do next thanks -- -- http://www.kedai.com.my/kk Am I Evil? ___ 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 ) begin:vcard n:Taylor;Monty tel;cell:+31 (0)6 200 17486 tel;fax:+31 (0)20 589 5566 tel;work:+31 (0)20 589 5517 x-mozilla-html:TRUE url:http://www.goldridge.net org:Information Innovation adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands version:2.1 email;internet:[EMAIL PROTECTED] title:Information Artist x-mozilla-cpt:;0 fn:Monty Taylor end:vcard