[Zope-DB] DCOracle2 problem on Solaris 8

Matthew T. Kromer matt@ZOPE.COM
Wed, 17 Jul 2002 13:55:28 -0400


tenasakai@earthlink.net wrote:

>Antonio Orlando wrote:
>
>	> Does the user 'report' have 'select' permission on the 'scott' schema?
>	> just another point of view... this code runs fine in my db...(runned in
>	> python 1.5, thought...)
>
>I am encouraged by your statement, but I am sticking to my gun.
>
>Let me state version numbers one more time:
>	Python          2.1.3
>	Zope            2.5.1
>	DCOracle2       1.1
>	machine:        Sparc SunFire4800, Solaris 8 (SunOS 5.8), vixen
>You say your Python is 1.5?  What about Zope and DCOracle2?
>Are you running Python on Sun or Windows?
>
>Here's a concise version to illustrate my point.  My comments
>are with ## at the beginning of the line and what I typed to the
>computer and what the computer returned are indented.
>
>Script started on Wed Jul 17 09:54:35 2002
>
>##First, let's set the baseline.
>
>vixen: ~, 1 
>vixen: ~, 1 sqlplus scott/tiger@glbl
>
>SQL*Plus: Release 8.1.6.0.0 - Production on Wed Jul 17 09:54:51 2002
>
>(c) Copyright 1999 Oracle Corporation.  All rights reserved.
>
>
>Connected to:
>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
>With the Partitioning option
>JServer Release 8.1.7.0.0 - Production
>
>SQL> 
>SQL> select * from scott.emp;
>
>     EMPNO ENAME      JOB	       MGR HIREDATE	    SAL       COMM
>---------- ---------- --------- ---------- --------- ---------- ----------
>    DEPTNO
>----------
>      7369 SMITH      CLERK	      7902 17-DEC-80	    800
>	20
>
>      7499 ALLEN      SALESMAN	      7698 20-FEB-81	   1600        300
>	30
>
>      7521 WARD       SALESMAN	      7698 22-FEB-81	   1250        500
>	30
>
>##				...more output lines...
>##				....which I deleted....
>
>14 rows selected.
>
>SQL> 
>SQL> exit
>Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
>With the Partitioning option
>JServer Release 8.1.7.0.0 - Production
>
>##Ok, that is good enough.  Let's see if I can do the same from Python.
>
>vixen: ~, 2 
>vixen: ~, 2 python -V
>Python 2.1.3
>
>##It is the correct version as suggested by Fabiano.
>##Let's run it.
>
>vixen: ~, 3 
>vixen: ~, 3 python
>Python 2.1.3 (#1, Jul 16 2002, 13:17:06) 
>[GCC 3.0.3] on sunos5
>Type "copyright", "credits" or "license" for more information.
>  
>
>>>>import dco2
>>>>
>>>>        
>>>>

Erm

I just noticed

You're trying to use the C module alone

Dont

Instead, use DCOracle2

It wraps the C module for you

 >>> import DCOracle2
 >>> db = DCOracle2.connect('scott/tiger@glbl')

If you still get "an integer is required..."  then  setenv 
DCO2TRACELOG=dco2.tracelog

try again

send me the trace

*nothing* in the connect wants an integer, so I suspect something is 
FUNKY in your environment.

(Funky writing style courtesy of the music I'm listening to)

If you try to use the C interface natively, you have to code 
differently.  You can get faster results, but it isn't DB API compatible.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/