[Zope] ZODB based Product problem
Antonio Jesús Carrasco García
antoniojezu@hotmail.com
Wed, 16 Jan 2002 15:09:17 +0000
Hello again.
Whatīs the problem with my question?
Is it very difficult?
Nobody knows how to do it?
Isnīt there any way to do it?
Donīt you understand my english?
I need an answer. Or only a feedback to say:
"Ok, Antonio. I have read your e-mail, but I donīt know the way to do it.
Try another way to do it!."
Please, I need something. Iīm becoming crazy.
Thanks.
Antonio Carrasco
www.grupoiud.com
>From: "Antonio Carrasco" <antoniojezu@hotmail.com>
>To: <zope@zope.org>
>CC: <zodb-dev-@zope.org>, <zope-dev@zope.org>
>Subject: [Zope] ZODB based Product problem
>Date: Mon, 14 Jan 2002 23:51:41 +0100
>
>Donīt forget. Iīm spanish and my english may not be enough good. Have fun
>with this e-mail.
>
>Iīve been a lot of time looking for documentation, studing it and trying to
>develop usefull things with ZODB. Here is my problem.
>
>Well. Iīm working in a Product in wich I use a ZODB to store data. I donīt
>use Data.fs, Iīm trying to use the ZODB with my own file and collection. I
>have a product with this properties or attributes:
> id: the id of the instance.
> title: the title
> ZODBFile: The ZODB where the user want to store the data. I use this
>name to construct a FileStorage wich is like
>'<ZOPEDIR>/lib/python/Products/MyZProduct/var/' + ZODBFile + '.fs
> colection: The colection inside the ZODBFile.
>
>When someone wants to add a MyZProduct instance, I show a form to fill this
>attributes. Well, the __init__ is like this:
> def __init__(self,id,title,ZODBFile,Colection):
> self.id=id
> self.title=title
> self.ZODBFile=ZODBFile
> self.Collection=Colection
> #Now try to connect to the database
> self.colection=FileStorage('<ZOPEDIR>/.......#and the name of the
>ZODBFile
>
>This last line make the Zope to raise an Error Message in commit in
>Connection object. I donīt remember now (Iīm not at work), but something
>like:
> "Attempt to store data from a remote database connection"
>
>??????????. Whatīs the problem?. May my ZProduct inherit some other Class
>or
>ZClass to be able to store the data?.
>
>Later I do a self.connection=db.open(). Another problem with this line. I
>canīt save in my class attributes this objects. The colection, neither the
>connection, and I need both to make the ZODB navigation, and the ZODB open
>and close methods.
>
>If you need more information, Iīll post another more comprensive e-mail.
>
>Thanks.
>Antonio Carrasco
>www.grupoiud.com
>PD: For spanish people I have written a How-To / Tutorial named
>crearUnProducto.
>www.zope.org/Members/rociana/misHowTo/crearUnProducto
>
>
>_______________________________________________
>Zope maillist - Zope@zope.org
>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 )
_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.yupimsn.com/intl.asp