On Wed, 03 Sep 2003 05:12:33 +0000
"Christine Ke" <[EMAIL PROTECTED]> wrote:

> To whom it may concerned,
> 
> I believe there is a bug in the sapdb module connecting to Python 2.3. Here 
> is a sample code to repeat the bug.
> 
> It works perfect in Python 2.2. It also works very well when I change the 
> database connection to sqlite in Python 2.3. But it can only run five times 
> in Python 2.3 with an error prompted by Python.exe:
> 
> The instruction at "0x77fcb032" referenced memory at "0x00000000". The 
> memory could not be "written".
> 
> When I moved the statement:
> 
> result = session.sql("select * from users")
> 
> from dbTest() to the loop in the main function I got the same error message 
> after running it 90 times.
> 
> Would you like to have a look at this issue.
> 
> Thanks,
> 
> Christine Ke


Perhaps the cause is the referenccounting in the C-module.
Tip: perhaps sys.getrefcount(...) helps debgging
...but this is only an idea...

> 
> 
> ###################################################
> #
> # sapdbTest.py - Test sapdb module in Python
> #
> ###################################################
> import sapdb
> 
> ###################################################
> #
> # dbTest - execute query in sapdb
> #
> ###################################################
> def dbTest():
>     print "dbTest"
>     result = session.sql("select * from users")
>     for row in result:
>         print row
> 
> ####################################################
> #
> # main - call dbTest repeatedly
> #
> ####################################################
> print "start testing"
> iCount = 0
> session = sapdb.connect('ABLING', 'ABLING', 'SDC', '')
> 
> while 1:
>     iCount += 1
>     print 'process', iCount
>     dbTest()
> 
> session.release()
> 
> _________________________________________________________________
> Hotmail is now available on Australian mobile phones. Go to  
> http://ninemsn.com.au/mobilecentral/signup.asp
> 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general


-- 
_____________________________________________
inworks GmbH            Andre Reitz             
H�rvelsinger Weg 39     Tel. 0731/93 80 7-21
89081 Ulm               http://www.inworks.de

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to