Re: [Zope-DB] Migrating zope from Windows to Linux

2010-10-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joel Fitzgerald wrote:
 Hi all, we currently have a document management system running on a zope
 platform on a Windows 2003 server. We would like to investigate
 migrating this to a Linux OS.
 
 Is this something that is achievable? Is there any documentation that
 may help get us started or point us in the right direction?
 
  

Create a Zope instance on Linux using the same software versions of Zope
and add-ons as used on Windows and copy over your Data.fs. That's it
basically - except you are running some hand-made software depending on
Windows features or so.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMyNdLAAoJEADcfz7u4AZjYcsLv1za/9abTGIaDHwoCqHs48Hj
ptB1VcqabqxzE9ZYCNdVx3da10NhSg2lWrj95kOoXiH8hjeOjdk54MMb5JEIl/yE
CdHnNE3YzIhE7/wgG1RnL7lD2oaDVAjFXhFKJYNpZ9QApmiAturpCP3mL+k258p4
lb3I+PBG3F8YwyqB/HjXYPFwIUp5VAizNozrlnnPoSmzlDPaeesKNg2xSTlOnWKg
uyy2d7Bd9c6pCOR/4J9tRlOKw2+nsmQ1sCEqztW+BDjwhiumvS2JLJGQtzayPiGt
1FIOnGF+5pfrqDrC/LktSIqn31ddmCKI3V5edocAnT4/URdbGQYKfcgST2J5Qm+O
fYhPEQ8/HZ14voqZcEmMtqY+nmwNlDCNdhQ2l+9txpwV5tfpm9qrrUedKtBdy0dq
jD9cgtY1LvZWIDy/Y3EPxUWlv/2xVyuwOiKIhy/qKdZ5zsr/Fo4nlaDlMco6SM75
R9dTgHpCRdvl09IUVj1iylUr5mlNZ5A=
=Y4kf
-END PGP SIGNATURE-
attachment: lists.vcf___
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] ORMs (Zope-DB Digest, Vol 72, Issue 1)

2010-08-26 Thread M.-A. Lemburg
Richard Harley wrote:
 Please can someone explain why ORM is better than speaking directly to 
 the database? Isn't this just  adding another layer of complexity which 
 in huge databases is certainly not needed.

It really all depends on what your needs are. This is my
experience:

If you just need to work with a simple database schema, change
schemas frequently, have straight-forward queries and don't
like or know SQL, you're probably better off with an ORM hiding SQL
away from you.

If you're working with more complex schemas and queries, need to
care about execution performance, want to use advanced database
techniques and can manage SQL (which really isn't all that difficult),
then you're better off writing straight SQL.

As for managing SQL statements and queries, this is usually best
done using an application specific thin abstraction layer. That
way you keep the queries in one place and can easily make
changes, if required.

Whether ZSQLMethods are a good way of implementing such a layer
is questionable - having those methods in the ZODB makes changes
difficult to implement. OTOH, they are well integrated into
Zope's object database and very easy to setup and use.

I'd suggest to use a Python class as abstraction layer and have
that use a Zope database connection object(s) for executing and
running the queries within a standard Zope transaction.

This approach then also lets you benefit from the better performance
and more security you get from using standard DB-API binding
parameters. ZSQLMethods only support inlining parameters into
the SQL statements which can result in SQL injection problems
as well as slower performance due to the fact that you're making
it harder for the database to cache access plans.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 26 2010)
 Python/Zope Consulting and Support ...http://www.egenix.com/
 mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try our new mxODBC.Connect Python Database Interface for free ! 


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
___
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: [Zope] Bug in ZSQL test?

2008-07-10 Thread Jaroslav Lukesh

Hi all,

many years I use patched files - here are (see attachment) from my Zope 251 
at

ZOPEROOT/lib/python/Shared/DC/ZRDB/dtml

But it is not able to handle to lng queries, for long queries it 
needs one more little mod with FORM tag. So see the little nuances with your 
newer zope sources ;-)


Regards, JL.

- Original Message - 
From: Garry Saddington [EMAIL PROTECTED]




On Thursday 10 July 2008 20:47, Allen Schmidt Sr. wrote:

I know, I know...too old to worry about...
Zope 2.8.9.1 on RedHat and MySQL5

In the Test tab of a ZSQL method, where the query has parameters, when
we enter parameters that generate a result of more than 20 rows, we get
the link for next 20 results. However, the parameters are not getting
passed in and the next page shows all the rows as if no parameters 
passed.


Anyone else seen this?

Yes Zope 2.9 gives error for the missing parameters on second page. I have
just lived with it having seen the error before on this list.


connectionTestForm.dtml
Description: Binary data


customDefaultReport.dtml
Description: Binary data
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope-DB Digest, Vol 56, Issue 2

2008-03-12 Thread Cu Vinh Loc
Dear friends,

Please show me how to query user table of zope and control (using python)
that.

Thanks,
Cu Vinh Loc.


 Send Zope-DB mailing list submissions to
   zope-db@zope.org

 To subscribe or unsubscribe via the World Wide Web, visit
   http://mail.zope.org/mailman/listinfo/zope-db
 or, via email, send a message with subject or body 'help' to
   [EMAIL PROTECTED]

 You can reach the person managing the list at
   [EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Zope-DB digest...


 Today's Topics:

1. Re: Help me. (Charlie Clark)
2. Re: Zope-DB Digest, Vol 56, Issue 1 (Cu Vinh Loc)
3. Re: Re: Zope-DB Digest, Vol 56, Issue 1 (Charlie Clark)


 --

 Message: 1
 Date: Tue, 11 Mar 2008 17:06:38 +0100
 From: Charlie Clark [EMAIL PROTECTED]
 Subject: Re: [Zope-DB] Help me.
 To: Cu Vinh Loc [EMAIL PROTECTED], zope-db@zope.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8

 Am 11.03.2008, 16:13 Uhr, schrieb Cu Vinh Loc [EMAIL PROTECTED]:

   Dear friends,
  I am using plone for deploying the website, but I have some problems
 such as:
- Using relational (internal) database Gadfly database: I do not
 know
 where the database is stored in the Zope. Can I manipulate directly
 this database visual?
- Users and groups: How to assign this permissions to my website.
  Could you show me how to implement that easily.

 Dear Cu Vin Loc,

 you have simply reposted your e-mail to the Archetypes list this morning
 apparently without looking at the documentation I suggested.

 While you are reading up on the basics of using Zope and relational
 databases it might be an idea to let us know exactly what you want to do.
 As a kick-start on using Zope you might also wish to look at my
 presentation at EuroPython last year. It covers the very basics of using
 ZSQL in Zope and there is a download with code for your to play with.

 http://www.egenix.com/library/presentations/EuroPython2007-Zope-and-RDBMS/

 Good luck!

 Charlie
 --
 Charlie Clark
 eGenix.com

 Professional Python Services directly from the Source
 Python/Zope Consulting and Support ...http://www.egenix.com/
 mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/
 

  Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! 

  eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
  D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
 Registered at Amtsgericht Duesseldorf: HRB 46611


 --

 Message: 2
 Date: Wed, 12 Mar 2008 09:50:09 +0700 (ICT)
 From: Cu Vinh Loc [EMAIL PROTECTED]
 Subject: [Zope-DB] Re: Zope-DB Digest, Vol 56, Issue 1
 To: zope-db@zope.org
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain;charset=utf-8

 Dear friends,

 In my website, there are many user groups and each group will have
 different persission but I do not know how to assign permission for
 certain users. Assume that I have a form that including some functions
 such as: view, update, insert, delete. In this case, if users have normal
 permission they are only view but users have hight permission they can
 update, insert, delete,...

 I use gadfly DB to create own database. In this case, can I combine this
 DB with users table of the system?

 Please show me how to perfome that in plone and zope.

 Thank you very much,

 Cheers,
 Cu Vinh Loc.

 Send Zope-DB mailing list submissions to
  zope-db@zope.org

 To subscribe or unsubscribe via the World Wide Web, visit
  http://mail.zope.org/mailman/listinfo/zope-db
 or, via email, send a message with subject or body 'help' to
  [EMAIL PROTECTED]

 You can reach the person managing the list at
  [EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Zope-DB digest...


 Today's Topics:

1. Help me. (Cu Vinh Loc)
2. Re: Help me. (robert rottermann)
3. Re: Help me. (Andreas Jung)


 --

 Message: 1
 Date: Tue, 11 Mar 2008 22:13:29 +0700 (ICT)
 From: Cu Vinh Loc [EMAIL PROTECTED]
 Subject: [Zope-DB] Help me.
 To: zope-db@zope.org
 Message-ID:
  [EMAIL PROTECTED]
 Content-Type: text/plain;charset=utf-8

   Dear friends,

   I am using plone for deploying the website, but I have some problems
 such as:
- Using relational (internal) database Gadfly database: I do not
 know
 where the database is stored in the Zope. Can I manipulate directly
 this database visual?
- Users and groups: How to assign this permissions to my website.

   Could you show me how to implement that easily.

   Cheers,
   Cu Vinh Loc

[Zope-DB] Re: [Zope] Conflict errors

2007-07-27 Thread Maciej Wisniowski
 Could anyone suggest whats happening here that cause this error.
Look at list archives.

You may try to incerase session-resolution-seconds to 300 in your
instances zope.conf and see if there is less of these errors.

BTW. Zope-DB is about Zope and relational databases only.

-- 
Maciej Wisniowski
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Connecting Zope 3 to Oracle 10g

2007-07-15 Thread Catriona Johnson

Hello

I am a novice Zope 3 user and would like some help in the best method
to connect to an existing Oracle instance using Zope 3. The reason I
want to do this is to take advantage of Oracle's spatial data types
and our corporate data store.

I am developing an OLTP web application that allows users to manage
their own data with the possibility of developing some kind of data
warehouse with nonspatial and spatial data.

Any advice is appreciated, especialy code snippets.
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Connecting Zope 3 to Oracle 10g

2007-07-15 Thread Andreas Jung



--On 16. Juli 2007 12:31:50 +1000 Catriona Johnson 
[EMAIL PROTECTED] wrote:



Hello

I am a novice Zope 3 user and would like some help in the best method
to connect to an existing Oracle instance using Zope 3. The reason I
want to do this is to take advantage of Oracle's spatial data types
and our corporate data store.

I am developing an OLTP web application that allows users to manage
their own data with the possibility of developing some kind of data
warehouse with nonspatial and spatial data.




Look at z3c.sqlalchemy or z3c.zalchemy.

-aj

pgpc51WPfAzD5.pgp
Description: PGP signature
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope hungs: mxODBC + Progress ODBC on Windows

2007-01-22 Thread Pawel Lewicki

Charlie Clark napisał(a):

Am 22.01.2007, 11:24 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:


Hi,
I'm using a configuration from the subject. It's quite an old Zope 2.7 
instance without prospects of upgrade because of dependencies.
Problem is with ODBC broker timeouts. When query takes too much time 
the connection breaks and Zope hangs. I suspect that ODBC client hangs 
and binds mxODBC binaries.
I have the same problem when ODBC client is badly configured and I 
restart Zope with open connection.
What would be the best option to free Zope from hung process? 
Additional layer like ODBC-ODBC bridge if available?


Can you provide more detailed information about your setup? ie. which 
combination of driver and bridge on which platforms you're using?


Charlie


Progress 9.1 + OpenLink ODBC broker(5.1) on Solaris 32 Bit Sun Sparc 
Openlink ODBC client + Zope2.7 on Windows XP


Pawel Lewicki


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope hungs: mxODBC + Progress ODBC on Windows

2007-01-22 Thread Charlie Clark

Am 22.01.2007, 11:54 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:


Charlie Clark napisał(a):
Am 22.01.2007, 11:24 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:
 Hi,
I'm using a configuration from the subject. It's quite an old Zope 2.7  
instance without prospects of upgrade because of dependencies.
Problem is with ODBC broker timeouts. When query takes too much time  
the connection breaks and Zope hangs. I suspect that ODBC client hangs  
and binds mxODBC binaries.
I have the same problem when ODBC client is badly configured and I  
restart Zope with open connection.
What would be the best option to free Zope from hung process?  
Additional layer like ODBC-ODBC bridge if available?


Can you provide more detailed information about your setup? ie. which   
combination of driver and bridge on which platforms you're using?


 Progress 9.1 + OpenLink ODBC broker(5.1) on Solaris 32 Bit Sun Sparc  
Openlink ODBC client + Zope2.7 on Windows XP


That is an interesting combination! Have you been in touch with Openlink  
at all? The mxODBC Zope DA is pretty resilient but will, of course, have  
problems if the driver it is talking to times out or freezes. How many  
connections have you got running? mxODBC should be able to open an  
additional connection if necessary and possible. I think it is essential  
to find out what is causing the queries to timeout.


Charlie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope hungs: mxODBC + Progress ODBC on Windows

2007-01-22 Thread Pawel Lewicki

Charlie Clark napisał(a):

Am 22.01.2007, 11:54 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:


Charlie Clark napisał(a):
Am 22.01.2007, 11:24 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:
 Hi,
I'm using a configuration from the subject. It's quite an old Zope 
2.7 instance without prospects of upgrade because of dependencies.
Problem is with ODBC broker timeouts. When query takes too much time 
the connection breaks and Zope hangs. I suspect that ODBC client 
hangs and binds mxODBC binaries.
I have the same problem when ODBC client is badly configured and I 
restart Zope with open connection.
What would be the best option to free Zope from hung process? 
Additional layer like ODBC-ODBC bridge if available?


Can you provide more detailed information about your setup? ie. which  
combination of driver and bridge on which platforms you're using?


 Progress 9.1 + OpenLink ODBC broker(5.1) on Solaris 32 Bit Sun Sparc 
Openlink ODBC client + Zope2.7 on Windows XP


That is an interesting combination! Have you been in touch with Openlink 
at all? The mxODBC Zope DA is pretty resilient but will, of course, have 
problems if the driver it is talking to times out or freezes. How many 
connections have you got running? mxODBC should be able to open an 
additional connection if necessary and possible. I think it is essential 
to find out what is causing the queries to timeout.


Charlie


I know what's causing timeouts :) I can't help it now. Increasing 
connection number doesn't help. I don't blame mxODBC as it is a great 
product.
I just wonder if anyone had similar problems with any ODBC client. Maybe 
there is a way to bind mxODBC another way or use additional non-breaking 
layer.


Pawel Lewicki

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope hungs: mxODBC + Progress ODBC on Windows

2007-01-22 Thread Charlie Clark

Am 22.01.2007, 13:00 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:


 I know what's causing timeouts  I can't help it now.


It would still be useful to others: is it a database, network or driver  
issue.


Increasing connection number doesn't help. I don't blame mxODBC as it is  
a great product.


Thanks

I just wonder if anyone had similar problems with any ODBC client. Maybe  
there is a way to bind mxODBC another way or use additional non-breaking  
layer.


What's the best to resolve it manually? Close and reopen the connection?

Charlie

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope hungs: mxODBC + Progress ODBC on Windows

2007-01-22 Thread Pawel Lewicki

Charlie Clark napisał(a):

Am 22.01.2007, 13:00 Uhr, schrieb Pawel Lewicki [EMAIL PROTECTED]:


 I know what's causing timeouts  I can't help it now.


It would still be useful to others: is it a database, network or driver 
issue.


Increasing connection number doesn't help. I don't blame mxODBC as it 
is a great product.


Thanks

I just wonder if anyone had similar problems with any ODBC client. 
Maybe there is a way to bind mxODBC another way or use additional 
non-breaking layer.


What's the best to resolve it manually? Close and reopen the connection?

Charlie


You'd have to be able to get into Zope first :) Problem is that the 
whole service hangs.


Pawel

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope database connectivity

2006-10-09 Thread Pawel Lewicki

Hi,

Maciej Wisniowski napisał(a):



If one is careful, one can find a reliable solution...


Hopefully I think I did this today...

I've found that psycopg pool implementation has nice
class:

class PersistentConnectionPool(AbstractConnectionPool):
   A pool that assigns persistent connections to different threads.

   Note that this connection pool generates by itself the required keys
   using the current thread id.  This means that untill a thread put away
   a connection it will always get the same connection object by successive
   .getconn() calls. This also means that a thread can't use more than one
   single connection from the pool.
   

I used this, and finally I have DCOracle2 with connection pool, without
volatile attributes (I didn't changed implementation of stored 
procedures yet),
with ability to reconnect after things like DB restart and with REAL 
ability to

open/close connections from ZMI.


Did anyone try SQL Relay as a bridge? They say When using SQL Relay, 
the database can be bounced without having to restart Zope



Pawel Lewicki

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Zope database connectivity

2006-10-09 Thread Maciej Wisniowski



I used this, and finally I have DCOracle2 with connection pool, without
volatile attributes (I didn't changed implementation of stored 
procedures yet),
with ability to reconnect after things like DB restart and with REAL 
ability to

open/close connections from ZMI.


Did anyone try SQL Relay as a bridge? They say When using SQL Relay, 
the database can be bounced without having to restart Zope

I tried this. It works, but possible problem
with volatile attributes persists - it is specific to
Zope Database Adapters, and SQLRelay adapter
uses '_v_' attributes too.

Issue with 'reconnect' behaviour of SQLRelay may
be that your Zope instance will appear 'hanged'
when database is not running (or something like that)
because Zope threads will be waiting for DB response.
AFAIR there is no timeout for SQLRelay (sometimes
it is good, sometimes not). Another question
is what happens with transactions integrity
in this situation.

--
Maciej Wisniowski

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope] DB in Zope

2006-07-25 Thread Chris Withers

Alan wrote:

I need a very simple DB in Zope, a table with 5 columns, less than 100
entries, to write, read and update, nothing else. Is Gadfly a serious
option? Do l loose my database if Zope is restarted? Which other
option, easy to use? A tutorial?


Don't use Gadfly.

I'd probably just do this with a Folder full of File objects (storing 
the columns as properties on the File objects) and a ZCatalog to give 
you the searching.


Otherwise, just hook up MySQL or Postgres and away you go...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DB in Zope

2006-07-25 Thread Dieter Maurer
Alan wrote at 2006-7-24 19:06 +0100:
I need a very simple DB in Zope, a table with 5 columns, less than 100
entries, to write, read and update, nothing else.

Is Gadfly a serious
option?

I would not use it.

When I tried it (a long time ago) the version that came with
Zope had serious problems (among others, it was not thread safe).

Do l loose my database if Zope is restarted?

No.

Which other
option, easy to use? A tutorial?

Maybe, TinyTable[Plus] is an option for you?



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DB in Zope

2006-07-25 Thread Gabriel Genellina

At Tuesday 25/7/2006 14:02, Peter Bengtsson wrote:

I need a very simple DB in Zope, a table with 5 columns, less than 100

entries, to write, read and update, nothing else. Is Gadfly a serious
option? Do l loose my database if Zope is restarted? Which other
option, easy to use? A tutorial?
Gadly is not a serious option. If you're going for SQL you should 
go for something more real like Postgresql (powerful) or Mysql (trendy) etc.


Another option could be SQLite:
SQLite is a small C library that implements a self-contained, 
embeddable, zero-configuration SQL database engine.

http://www.sqlite.org/



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DB in Zope

2006-07-25 Thread Paul Winkler
On Tue, Jul 25, 2006 at 05:10:26PM -0300, Gabriel Genellina wrote:
 At Tuesday 25/7/2006 14:02, Peter Bengtsson wrote:
 
 I need a very simple DB in Zope, a table with 5 columns, less than 100
 entries, to write, read and update, nothing else. Is Gadfly a serious
 option? Do l loose my database if Zope is restarted? Which other
 option, easy to use? A tutorial?
 Gadly is not a serious option. If you're going for SQL you should 
 go for something more real like Postgresql (powerful) or Mysql (trendy) 
 etc.
 
 Another option could be SQLite:
 SQLite is a small C library that implements a self-contained, 
 embeddable, zero-configuration SQL database engine.
 http://www.sqlite.org/

Probably fine for this job.  ZSqliteDA works fine, I used it for some
testing recently.  

(side note: don't use sqlite as a testing-only stand-in for whatever
database you actually deploy to. I tried that, it's a dead end IMO.
Sooner or later you will run up against feature or syntax differences.)

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] DB in Zope

2006-07-24 Thread Alan

Hi!

I need a very simple DB in Zope, a table with 5 columns, less than 100
entries, to write, read and update, nothing else. Is Gadfly a serious
option? Do l loose my database if Zope is restarted? Which other
option, easy to use? A tutorial?

Many thinks in advance.

Cheers,
Alan

--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.

http://www.bio.cam.ac.uk/~awd28

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DB in Zope

2006-07-24 Thread Alexis Roda

En/na Alan ha escrit:

Hi!

I need a very simple DB in Zope, a table with 5 columns, less than 100
entries, to write, read and update, nothing else. Is Gadfly a serious
option? Do l loose my database if Zope is restarted? Which other
option, easy to use? A tutorial?


Take a look at PropertyTools:

http://iungo.org/products/PropertyTools



HTH
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-DB] regarding zope

2006-07-05 Thread dieter
[EMAIL PROTECTED] wrote at 2006-7-5 18:56 +0530:
i am developing a project using Zope 2.7.6-final, python 2.3.5 on debian
linux.
Wheneever i make changes in python script or any thing regarding project.
it is not get effected.

Are you sure, your Zope is running in debug mode?

Otherwise, a restart is necessary that Zope sees a change.



-- 
Dieter
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Jamie O'Keefe
On 4/6/06, Charlie Clark [EMAIL PROTECTED] wrote:
 This still should not be causing this problem. Jamie, you should be talking
 to the DBA or looking at the DB side of things.

Well it is a volunteer operation, so we don't specifically have a dba,
but will talk with the person who set up the db.

 Is the DB running on the
 same machine as Zope or on the network?

Yes.

 What are connection times set to?

Do you mean the connection timeout time?

 It might simply be that MySQL is running out of connections although this
 usually means that the whole machine runs slow.

We upped the # of connections and I have seen 51 connections open at
one time.  Not sure the rate at which people are accessing the form
and submitting it, but I believe it may be 25-50 a day.

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Charlie Clark

On 2006-04-06 at 16:34:01 [+0200], Jamie O'Keefe [EMAIL PROTECTED] 
wrote:
 On 4/6/06, Charlie Clark [EMAIL PROTECTED] wrote:
  This still should not be causing this problem. Jamie, you should be 
  talking
  to the DBA or looking at the DB side of things.
 
 Well it is a volunteer operation, so we don't specifically have a dba,
 but will talk with the person who set up the db.
 
  Is the DB running on the
  same machine as Zope or on the network?
 
 Yes.
 
  What are connection times set to?
 
 Do you mean the connection timeout time?

Yes. The default for these are very high which often causes problems for 
applications that don't implement connection pooling. However, as I 
previously said this is unlikely to be the source of the problem.

  It might simply be that MySQL is running out of connections although this
  usually means that the whole machine runs slow.
 
 We upped the # of connections and I have seen 51 connections open at
 one time.  Not sure the rate at which people are accessing the form
 and submitting it, but I believe it may be 25-50 a day.

At that rate there is no reason on the Zope side for the connection being 
dropped. There could be a problem with the underlying Python driver and thus 
the ZopeDA so you might want to install the latest version of both:

http://sourceforge.net/project/showfiles.php?group_id=22307

MySQL 3.2 is still supported.

But you should also run Zope in debug mode and see what gets written to the 
error log.

Charlie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Jamie O'Keefe
Hi Dieter,

 We switched to Postgres, MySQL is used only for legacy components.

Isn't postgres linux only?  We use FreeBSD.

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Jamie O'Keefe
Thanks for the suggestions, Charlie.

Will try as you suggested.

Jamie

On 4/6/06, Charlie Clark [EMAIL PROTECTED] wrote:

 On 2006-04-06 at 16:34:01 [+0200], Jamie O'Keefe [EMAIL PROTECTED]
 wrote:
  On 4/6/06, Charlie Clark [EMAIL PROTECTED] wrote:
   This still should not be causing this problem. Jamie, you should be
   talking
   to the DBA or looking at the DB side of things.
 
  Well it is a volunteer operation, so we don't specifically have a dba,
  but will talk with the person who set up the db.
 
   Is the DB running on the
   same machine as Zope or on the network?
 
  Yes.
 
   What are connection times set to?
 
  Do you mean the connection timeout time?

 Yes. The default for these are very high which often causes problems for
 applications that don't implement connection pooling. However, as I
 previously said this is unlikely to be the source of the problem.

   It might simply be that MySQL is running out of connections although this
   usually means that the whole machine runs slow.
 
  We upped the # of connections and I have seen 51 connections open at
  one time.  Not sure the rate at which people are accessing the form
  and submitting it, but I believe it may be 25-50 a day.

 At that rate there is no reason on the Zope side for the connection being
 dropped. There could be a problem with the underlying Python driver and thus
 the ZopeDA so you might want to install the latest version of both:

 http://sourceforge.net/project/showfiles.php?group_id=22307

 MySQL 3.2 is still supported.

 But you should also run Zope in debug mode and see what gets written to the
 error log.

 Charlie



--
Jamie O'Keefe
www.jamesokeefe.org
jokeefe.typepad.com - my personal blog
jokeefe.typepad.com/green_politics/ - my political blog
jokeefe.typepad.com/nonviolence/ - my blog on nonviolence
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Andreas Jung



--On 6. April 2006 14:46:36 -0400 Jamie O'Keefe [EMAIL PROTECTED] 
wrote:



Hi Dieter,


We switched to Postgres, MySQL is used only for legacy components.




Huh...google will tell you that it runs even on Windows.

-aj


   ---
  -   Andreas JungZOPYX Ltd.  Co KG-
 -   E-mail: [EMAIL PROTECTED]   Web: www.zopyx.com, www.zopyx.de -
  ---


pgpt9j8A3STBo.pgp
Description: PGP signature
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Charlie Clark

On 2006-04-06 at 20:46:36 [+0200], Jamie O'Keefe [EMAIL PROTECTED] 
wrote:
 Hi Dieter,
 
  We switched to Postgres, MySQL is used only for legacy components.
 
 Isn't postgres linux only?  We use FreeBSD.

PostgreSQL was developed at the University of California, Berkeley and runs 
on a huge range of problems. I prefer it over MySQL but I am not convinced 
that switching to PostgreSQL will solve your problems and, of course, will 
involve all the work of migration.

Charlie
-- 
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
  Python/Zope Consulting and Support ...http://www.egenix.com/
  mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
  mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2005-10-17: Released mxODBC.Zope.DA 1.0.9http://zope.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! 
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-06 Thread Andreas Jung



--On 6. April 2006 21:51:05 +0200 Charlie Clark [EMAIL PROTECTED] wrote:



On 2006-04-06 at 20:46:36 [+0200], Jamie O'Keefe
[EMAIL PROTECTED]  wrote:

Hi Dieter,

 We switched to Postgres, MySQL is used only for legacy components.

Isn't postgres linux only?  We use FreeBSD.


PostgreSQL was developed at the University of California, Berkeley and
runs  on a huge range of problems.


problems? you mean systems :-)

-aj

pgpZvGcsVmzJX.pgp
Description: PGP signature
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-05 Thread Chris Withers

Jamie O'Keefe wrote:

try:
  result = context.updatePerson(**query_args)
  return text
except Exception:


This is insane code. If you want to get mailed errors, look at the 
MailingLogger product.




The traceback error is:

Exception Type  Database Error
Exception Value updatePerson is not connected to a database


What version of Zope/MySQL/mysqldb/ZMySQLDA are you using?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-05 Thread Jamie O'Keefe
Hi Chris

On 4/5/06, Chris Withers [EMAIL PROTECTED] wrote:
 Jamie O'Keefe wrote:
  try:
result = context.updatePerson(**query_args)
return text
  except Exception:

 This is insane code. If you want to get mailed errors, look at the
 MailingLogger product.

Did.  What if you don't know what the errors could be?

  The traceback error is:
 
  Exception TypeDatabase Error
  Exception Value   updatePerson is not connected to a database

 What version of Zope/MySQL/mysqldb/ZMySQLDA are you using?

Zope is 2.6.4
MySql is 3.22.32
ZMySQLDA 2.0.8

i don't know the version of mysqldb.

Thanks.

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-05 Thread Jamie O'Keefe
Hi Dieter,

On 4/5/06, Dieter Maurer [EMAIL PROTECTED] wrote:
 Jamie O'Keefe wrote at 2006-4-5 01:32 -0400:
 I have written a series of zope pages for a person to update their
 record in our mysql database.   They use a zpt-python-db sql-db
 driver-db flow and work pretty well.
 
 Unfortunately, if enough people use it, the number of open db
 connections grows until it hits a limit and the db stops accepting
 connections.  I have seen that there is a connection issue with zope
 and mysql, but have not been able to find a solution.  Is there one?

 We are using MySQL and Zope (via ZMySQLDB) and do not see this problem.
 Apparently, Zope handles connections in principle correctly...

What version of MySQL are you using?

One thing I just noticed is that if I connect in via the unix shell
client, quit and login again, the number of connections goes up.  Not
unusual.  In a slow period i will need to see if the number goes down
as well.

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mysql / zope db connection issue

2006-04-05 Thread Jamie O'Keefe
  What version of Zope/MySQL/mysqldb/ZMySQLDA are you using?

 Zope is 2.6.4
 MySql is 3.22.32
 ZMySQLDA 2.0.8

 i don't know the version of mysqldb.

I think this is 0.9.

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] mysql / zope db connection issue

2006-04-04 Thread Jamie O'Keefe
Hi,

I have written a series of zope pages for a person to update their
record in our mysql database.   They use a zpt-python-db sql-db
driver-db flow and work pretty well.

Unfortunately, if enough people use it, the number of open db
connections grows until it hits a limit and the db stops accepting
connections.  I have seen that there is a connection issue with zope
and mysql, but have not been able to find a solution.  Is there one?

Also, I put in some exception handling to trap any db errors and email
the post if there are any.  However, i am not sure it is working.  I
performed a test to the db update from my page with the db off and got
a Database Error that wasn't caught by my exception handler.  I am not
sure why since I thought Exception would be the root of Database
Errors.  My code looks like this:

try:
  result = context.updatePerson(**query_args)
  return text
except Exception:
  try:
mto = to address
mfrom = from address
subject = Updated supporter information
body = printed
context.MailHost.simple_send(mto, mfrom, subject, body)
print result
return text
  except Exception:
errorText = 'h1Ooooppps!/h1pThere was an error submitting
your information to our database and our backup logging method. 
Please email the a href=mailto:webmaster@domainwebmaster/a
that you got an error so that we can track it down and fix
it./ppThanks!/p'
print errorText
return printed
return errorText

The traceback error is:

Exception Type  Database Error
Exception Value updatePerson is not connected to a database

Any insights would be most welcome.

Thanks!

Jamie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] regarding zope database

2006-01-30 Thread Dieter Maurer
-bhavana - [EMAIL PROTECTED] wrote at 2006-1-30 10:27 +0700:
 ...
How to communicate with zope database?

You use Zope (or scripts using the Zope codebase).

the documents that we post in Plone
have id, ya?

There are lots of ids around.

  The id used in Plone is not a universal id, but unique only
  locally in the container. Therefore, you cannot use it
  to identify and fetch an object.

  Modern Plone versions (2.1.x) have documents based on
  AT. There have a universal unique id which can be resolved
  via the uid_catalog into the object.
  Someone else already recommended to read the catalog section
  of the Zope Book (online 2.7 edition). Follow this advice!

  All persitent objects already have a persitent id.
  It is not used at application level (as it is meaningless there).
  The persistent id is the id used by the Zope database.
  When you know the peristent id of an object, you can
  load it from ZODB *BUT* it will behave very differently
  from how you are acoustomed to. That's because you are
  *NOT* working with raw objects in Zope/Plone but with
  acquisition wrappers. A ZODB load gives you instead
  the raw object, which, among other, does not have
  a location, nor an URL nor a parent

-- 
Dieter
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] regarding zope database

2006-01-29 Thread -bhavana -
hi all..

How to communicate with zope database? the documents that we post in
Plone have id, ya? it is store in data.fs. how to extract those ids
with query? Plz help on this regard.

many thankx,
bs
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] mxODBC Zope DB2 adapter - how to specify the current schema?

2006-01-20 Thread M.-A. Lemburg
Gergana Silvanova wrote:
 Dear all,
 
 I'm using Zope with IBM DB2... the adapter which I use is mxODBC DA from 
 eGenix... in the database connection string, I can specify DSN, UID, PWD and 
 adapter-specific stuffdoes someone know if there is a way to specify the 
 current schema? I looked in the documentation, but did not find it.

The only way to do this would be in the connection string,
using additional parameters. Please consult the ODBC driver
documentation for available options.

FWIW, this page lists the options for the Linux DB2 ODBC driver:

http://www-03.ibm.com/servers/eserver/iseries/linux/odbc/guide/odbcproperties.html

This is the general documentation page for the driver:

http://www-03.ibm.com/servers/eserver/iseries/linux/odbc/guide/

 Until now I was using the Zope DBDA adapter from BlueDynamics, and I easily 
 could specify the schema, together with the database, username and password, 
 in the database connection.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 20 2006)
 Python/Zope Consulting and Support ...http://www.egenix.com/
 mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/


::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! 
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] mxODBC Zope DB2 adapter - how to specify the current schema?

2006-01-18 Thread Gergana Silvanova
Dear all,I'm using Zope with IBM DB2... the adapter which I use is mxODBC DA from eGenix... in the database connection string, I can specify DSN, UID, PWD and adapter-specific stuffdoes someone know if there is a way to specify the current schema? I looked in the documentation, but did not find it.Until now I was using the Zope DBDA adapter from BlueDynamics, and I easily could specify the schema, together with the database, username and password, in the database connection.Thanks in advance for the help,Gergana Silvanova
	
		Yahoo! Photos 
Got holiday prints? See all the ways to get quality prints in your hands ASAP.___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Re: Zope/Plone, interbase, and blob fields

2005-09-08 Thread Chris Withers

Ashley wrote:

When trying to execute this from an external method, Plone just freezes - no
errors, it just freezes.


PDB is your friend...


The external method is defined as follows:

def updateEntityNotes(self,notes,entKey):

import pdb
pdb.set_trace()

  try:
dbCon = gvib.connect(theDB, userName, userPass)
cur=dbCon.cursor()
cur.execute(UPDATE ENTITY SET EN_NOTES=? WHERE
EN_KEY=?,(notes,int(entKey)))
dbCon.commit()
return 'ok'
  except:
return 'bError:/bSorry, your request could not be processed
correctly.br'+str(traceback.format_exception(sys.exc_type, sys.exc_value,
sys.exc_traceback))


Bare excepts as you have above are a pretty bad idea, don't try and 
handle it like that, either catch specific exceptions you know about or 
leave standard_error_message to handle the lot...


PDB documentation can be found in the Documentation section of 
http://python.org in the Module Index section.


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] psycopg + zope problem

2005-09-07 Thread Martin Konicek
Hi,

I've just installed Zope + PsycoPg, but I cannot view Z PsycoPG list
entry in Zope [http://server:8080/manage]

Compile command:
./configure
--with-zope=/var/lib/zope/ 
--with-mxdatetime-includes=/usr/lib/python2.3/site-packages/mx/DateTime/mxDateTime
--with-postgres-includes=/usr/include/postgresql
--with-python=/usr/lib/python2.3

My configuration:
* Fedora Core 2
* Python 2.3.5 (precompiled from RPM)
* Zope 2.8 (precompiled from RPM)
* PsycoPg compiled succesfuly

Misc information:
* ls /usr/lib/python2.3/lib-dynload/
  [ ...output ommited...]
  psycopgmodule.so
  [ ...output ommited...]
* ls /var/lib/zope/lib/python/Products/ZPsycopgDA/
  [ ...output ommited...]
  browse.dtml
  __init__.py
  [ ...output ommited...]

Errors:
* I've not got any errors
* I don't know how to debug this bug and find right resolution

Thank you
-- 
=
Martin Koníček
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] psycopg + zope problem

2005-09-07 Thread Dieter Maurer
Martin Konicek wrote at 2005-9-7 17:26 +0200:
 ...
* ls /var/lib/zope/lib/python/Products/ZPsycopgDA/
  [ ...output ommited...]

Provided that Zope looks there for its products,
you should see any problems with the import of ZPsycopgDA
in your Zope logfile.

I cannot tell you where the Zope logfile lies on your installation.

-- 
Dieter
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Re: [Zope] DCOracle2 compile problem

2005-06-09 Thread Piotr Kral

Dieter Maurer wrote:

Michele Marcionelli wrote at 2005-1-20 08:09 +0100:


...
dco2.c: In function `Cursor_bind':
dco2.c:3393: `dword' undeclared (first use in this function)



If you are unlucky, then Oracle dropped the ancient
type definitions such as dword (double word).

In this case, dco2.c would need a severe facelift to
use more modern type names...



Today I was trying all day to compile DCOracle2 on RHES 3 witch Oracle 9
or 10 client and nothing. But in the evening (I've finished 10 minutes
ago) on my laptop with FC3 and oracle 10 client everything went fine.
The solution is to change 3 words in dco2.c You just need to change
dword to dvoid (all 3 times) and it's fine. I don't know why I
couldn't compile it on my development server. Idon't think it's os'es
problem, it's rather something with oracle client or environment
variables. I'll see it tomorow at work.


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db