[Zope-dev] Oracle Connection and ZSQLMethods

Matthew T. Kromer matt@zope.com
Wed, 29 Aug 2001 09:14:22 -0400


FWIW, I am not sure that's what the problem is; the Connection class in
DA.py in DCO2 defines id and extends DABase.Connection, which defines
_isAnSQLConenction=1.

Alan, maybe you can pare down a Data.fs with just an example that fails for
you and send it to me?  I'll set up an NT environment to test it against.
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "alan runyan" <runyaga@runyaga.com>
Cc: <zope-dev@zope.org>
Sent: Tuesday, August 28, 2001 5:51 PM
Subject: Re: [Zope-dev] Oracle Connection and ZSQLMethods


> alan runyan writes:
>  > I have some strange behavior that I can replicate happening on all my
boxes
>  > (dev and staging).  Its a huge problem for me.
>  >
>  > I am running Zope2.4 w/ DCOracle2 on Windows NT4.0.
>  >
>  > on development I installed Oracle Connection in the root
>  > /db_connection
>  > /folder
>  > /folder/sql_stmts
>  > /folder/sql_stmsts/all of my zsqlmethods are here
>  >
>  > when I copy Data.fs over to staging, I delete the db_connection and
recreate
>  > it with appropriate db_conn string.  but **all** my ZSQLMethods do not
>  > register the newly created db_connection(?) as a available Data source
and I
>  > get this when I edit them:
>  > There are no SQL database connections. You need to add a Zope SQL
database
>  > connection before you can edit a Zope SQL Method.
> ZSQLMethods use "Products.ZSQLMethods.SQL.SQLConnectionIds"
> to find the available SQL connections.
>
> This function looks for:
>
>      hasattr(o,'_isAnSQLConnection') and o._isAnSQLConnection
>                     and hasattr(o,'id')
>
> Apparently, your DCO2 connection object does not make this
> expression true.
>
> You should look at the DCO2 sources to find out why.
> Maybe, it did not set "_isAnSQLConnection=1".
> Maybe, it no longer defines "id" but only "getId".
>
>
> Dieter
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> 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 )
>