You can subscribe to this list here.
2003 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(3) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(8) |
Feb
(9) |
Mar
(2) |
Apr
|
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(6) |
2005 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
(3) |
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(21) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(13) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
|
Feb
(3) |
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Jon T. <jon...@gm...> - 2008-02-18 22:03:35
|
I find this a bit odd to say the least. Did it link without errors? Anyway it's easy enough to get rid of this, I'll get a new release out soon that doesn't use max. Could I send it to you direct, so you can verify before I release? regards, Jón On Feb 18, 2008 5:15 PM, Bolli Palmason <hro...@ya...> wrote: > Hello, > > I've installed the DB2 Application Development Client on linux (v. 8.1) and version 1.1.1 of PyDB2, but > when I try to import DB2 I get the following error: > > Python 2.5.1 (r251:54863, May 4 2007, 16:52:23) > [GCC 4.1.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import DB2 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.5/site-packages/DB2.py", line 12, in <module> > import _db2 > ImportError: /usr/lib/python2.5/site-packages/_db2.so: undefined symbol: max > >>> > > > Thanks in adv. > Bolli > |
From: Jon T. <jon...@gm...> - 2008-02-18 21:52:57
|
Hi, there is some code in CVS in release 1.10 for _db2_module.c that hasn't been yet been merged into the current release that solves this problem. It hasn't been merged because there were several bugs in revision 1.10, so I've been rather slow about merging that code in. I'll try to get out a release tomorrow to fix this. Regards, Jón On Feb 18, 2008 6:46 PM, Jürgen Maier <Jue...@fl...> wrote: > Hi, > > I have following problem with calling stored procedures by using > function callproc: > It is only possible to call a Stored Procedure which has the same > database schema than the user from the DB2-connect-string, although the > user has the rights for executing the stored procedure > I tried to call the stored procedure with 'schema'.'storedProcedure', > but that didn't work. It throws exception: > _db2.Error: ('42884', -440, '[IBM][CLI Driver][DB2/NT64] SQL0440N No > authorized routine named "SCHEMA1.TESTPROC1" of type "PROCEDURE" having > compatible arguments was found. SQLSTATE=42884\r\n') > Strange is, that it is possible to call a StoredProcedure from a other > schema with the function execute and the parameters ('call > 'schema'.storedProcedure'). Unfortunately it is only possible to use > this function with IN parameters and not with INOUT and OUT parameter. > > > cn=DB2.connect('database','user','password') > cs=cn.cursor() > > params = None > > # is working (has the same schema than the user from the connect sting) > returnValue = cs.callproc('TESTPROC8',params) > print returnValue > > # is also working > cs.execute('call SCHEMA1.TESTPROC1(123)') > > # is not working > returnValue = cs.callproc('SCHEMA1.TESTPROC1',123) > print returnValue > > cn.commit() > cs.close() > cn.close() > > Thanks for your help, > Juergen > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > |
From: Jürgen M. <Jue...@fl...> - 2008-02-18 18:46:30
|
Hi, I have following problem with calling stored procedures by using function callproc: It is only possible to call a Stored Procedure which has the same database schema than the user from the DB2-connect-string, although the user has the rights for executing the stored procedure I tried to call the stored procedure with 'schema'.'storedProcedure', but that didn't work. It throws exception: _db2.Error: ('42884', -440, '[IBM][CLI Driver][DB2/NT64] SQL0440N No authorized routine named "SCHEMA1.TESTPROC1" of type "PROCEDURE" having compatible arguments was found. SQLSTATE=42884\r\n') Strange is, that it is possible to call a StoredProcedure from a other schema with the function execute and the parameters ('call 'schema'.storedProcedure'). Unfortunately it is only possible to use this function with IN parameters and not with INOUT and OUT parameter. cn=DB2.connect('database','user','password') cs=cn.cursor() params = None # is working (has the same schema than the user from the connect sting) returnValue = cs.callproc('TESTPROC8',params) print returnValue # is also working cs.execute('call SCHEMA1.TESTPROC1(123)') # is not working returnValue = cs.callproc('SCHEMA1.TESTPROC1',123) print returnValue cn.commit() cs.close() cn.close() Thanks for your help, Juergen |
From: Bolli P. <hro...@ya...> - 2008-02-18 17:15:22
|
Hello, I've installed the DB2 Application Development Client on linux (v. 8.1) and version 1.1.1 of PyDB2, but when I try to import DB2 I get the following error: Python 2.5.1 (r251:54863, May 4 2007, 16:52:23) [GCC 4.1.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import DB2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/site-packages/DB2.py", line 12, in <module> import _db2 ImportError: /usr/lib/python2.5/site-packages/_db2.so: undefined symbol: max >>> Thanks in adv. Bolli __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com |
From: Jon T. <jon...@gm...> - 2008-02-14 15:29:17
|
Good that your other problem is solved. The crashing tests are probably due to reference counting errors in releases 1.1.0-2 and 1.1.0-3. There is a new release 1.1.1 that should address these. I have tested mostly with a win32 debug build of python, with which I've been able to reproduce these errors. They've now disappeared for me, so hopefully the same applies on linux. In the latest release there is also a nicer setup.py, so you'll hopefully have no need of manually entering the db2 installation dir. > > Jon, > Thank you for your help. > I have used the db2inst1 account to run it. It succeeds. > But after several function testing, it fails. > I am new to python. Do you have any idea what gets wrong with it? > > > [db2inst1@pc181 test]$ python test_basic.py > DB2.SQL_type_dict for description2 ... ok > DB2.connect() - Successful ... ok [snip] > Create table in random manner (columns of random types) ... python: > Modules/gcmo > dule.c:231: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. > Aborted > [db2inst1@pc181 test]$ > |
From: <sc...@at...> - 2008-02-14 09:24:25
|
LIM SIN-CHEE sc...@at... Jon, Thank you for your help. I have used the db2inst1 account to run it. It succeeds. But after several function testing, it fails. I am new to python. Do you have any idea what gets wrong with it? [db2inst1@pc181 test]$ python test_basic.py DB2.SQL_type_dict for description2 ... ok DB2.connect() - Successful ... ok DB2.connect() - Connection failure with wrong database ... ok DB2.connect() - Connection failure with wrong username ... ok DB2.connect() - Connection failure with wrong password ... ok db.cursor() - Successful ... ok cs.execute() - CREATE TABLE ... ok cs.execute() - INSERT (NORMAL) ... ok cs.execute() - INSERT (NULL) ... ok cs.execute() - INSERT (Wrong type) ... ok cs.execute() - INSERT (Right truncation) ... ok cs.execute() - INSERT (Wrong # of params) ... ok cs.fetchone() - SELECT (NORMAL) ... ok cs.fetchone() - SELECT (NULL) ... ok cs.fetchone() - fetch w/o SELECT ... ok cs.fetchone() - beyond the last result set ... ok cs.executemany() ... ok cs.fetchall() ... ok cs.fetchmany() ... ok cs.description & description2 ... ok cs.rowcount - w/ Non-scrollable cursor ... ok cs.callproc() - IN, OUT, INOUT parameters ... ok cs.callproc() - w/ Result set ... ok Create table in random manner (columns of random types) ... python: Modules/gcmo dule.c:231: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. Aborted [db2inst1@pc181 test]$ LIM SIN-CHEE sc...@at... 寄件人: "Jon 收件人: sc...@at... 日期: 2008/02/14 上午 06:31 主旨: Re: [PyDB2-discuss] Import DB2 error on DB2 v9.1 I'm assuming it built successfully and that it fails on runtime. Is it possible that you're not running as the db2 instance user? Try running db2 commands from db2cmd window as the user that's trying to run the DB2 tests. If you cannot, that's a strong indicator :-) If that is the case - or possibly even if it isn't - try running <DB2_root_dir>/sqllib/db2profile and see if that fixes the problem. On Feb 13, 2008 9:53 AM, <sc...@at...> wrote: > > > > Hi, > I have just installed PyDB2 by modifying the script setup.py. > 1. Add DB2_ROOT = "/opt/ibm/db2/V9.1" > 2. library_dirs=[dir_root_dir+'lib32'], > > But testing test_basic.py, receive the following error: > > Traceback (most recent call last): > File "test_basic.py", line 2, in ? > import DB2 > File "/usr/lib/python2.3/site-packages/DB2.py", line 10, in ? > import _db2 > ImportError: libdb2.so.1: cannot open shared object file: No such file or > directory > > > LIM SIN-CHEE > sc...@at... > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > > |
From: Jon T. <jon...@gm...> - 2008-02-14 08:14:53
|
I'm assuming it built successfully and that it fails on runtime. Is it possible that you're not running as the db2 instance user? Try running db2 commands from db2cmd window as the user that's trying to run the DB2 tests. If you cannot, that's a strong indicator :-) If that is the case - or possibly even if it isn't - try running <DB2_root_dir>/sqllib/db2profile and see if that fixes the problem. Jon PS: sorry about the double post sclim :-) On Wed, Feb 13, 2008 at 9:53 AM, <sc...@at...> wrote: > > > > Hi, > I have just installed PyDB2 by modifying the script setup.py. > 1. Add DB2_ROOT = "/opt/ibm/db2/V9.1" > 2. library_dirs=[dir_root_dir+'lib32'], > > But testing test_basic.py, receive the following error: > > Traceback (most recent call last): > File "test_basic.py", line 2, in ? > import DB2 > File "/usr/lib/python2.3/site-packages/DB2.py", line 10, in ? > import _db2 > ImportError: libdb2.so.1: cannot open shared object file: No such file or > directory > > > LIM SIN-CHEE > sc...@at... > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > > |
From: <sc...@at...> - 2008-02-13 09:55:08
|
Hi, I have just installed PyDB2 by modifying the script setup.py. 1. Add DB2_ROOT = "/opt/ibm/db2/V9.1" 2. library_dirs=[dir_root_dir+'lib32'], But testing test_basic.py, receive the following error: Traceback (most recent call last): File "test_basic.py", line 2, in ? import DB2 File "/usr/lib/python2.3/site-packages/DB2.py", line 10, in ? import _db2 ImportError: libdb2.so.1: cannot open shared object file: No such file or directory LIM SIN-CHEE sc...@at... |
From: Jon T. <jon...@gm...> - 2008-02-08 12:38:13
|
>Passing autocommit=True in DB2.connect() fails. I'm using PyDB2-1.1.0-2. autoCommit=True (NB: camelCase) |
From: Jon T. <jon...@gm...> - 2008-02-08 12:31:55
|
I hope this is relevant. Here's a wrapper that I use to connect from windows to windows DB2 7.2, DB2 8.2, DB2 9.1 and linux DB2 9.1. You can use the catalog name for the dns name, or you can use a special DNSString. As you can see you could use that DNSString to specify port and protocol as well def Connection(self, autoCommit = False): import DB2 import config db_name, db_host, db_username, db_password = config.get_db_parameters() if db_host: DNSString = "Provider=IBMDADB2;Database=%s;Hostname=%s;Protocol=TCPIP;Port=50000;" % (db_name, db_host) else: DNSString = db_name logging.debug(DNSString) return DB2.connect(DNSString, uid=db_username, pwd=db_password, autoCommit=autoCommit) On 2007-05-04 09:43 Jeremy M. Jones <zanesdad@be...> wrote >connect() method. It seems that dsn should be the hostname, uid should >be the user id, and pwd should be the password. But somewhere I read >that some option in the dsn should be a catalog name if you're |
From: Wagener, J. J <Joh...@st...> - 2007-08-25 21:48:42
|
Hi everyone, Firstly - sorry for the lengthy email. python.exe crashes on my machine when creating/closing cursors in a loop,= =20creating multiple cursors along with a commit etc. I run windows xp, p= ython 2.5, mingw32. here's a simplified version of the code that still crashes: <code> import DB2 conn =3D DB2.connect(dsn=3D'STATS', uid=3D***, pwd=3D***) for i in range(100): =20 curs =3D conn.cursor() =20 curs.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 print curs.fetchone() conn.close()=20 </code> the loop runs 26 times before I get a windows message that reads: The instruction at "0x792ae24" referenced memory at "0x00000006". The me= mory could not be read. I've experimented with the code and I get it to work if I create the curs= or before the loop instead of inside the loop(only one cursor object). =20 I've also tried creating the cursor objects in a dictionary so that I do = not use the same cursor name over and over. This seems to work and the c= ode executes fine - but as soon as conn.close() is called I get the same = error. I ran a trace and it looks like the crash happens when the cursor= =20objects have to be deleted from memory. I tried many different things - but it looks like things go belly up when= : - more than one connection is created in one script.=20 So this does not work: <code> import DB2 conn =3D DB2.connect(dsn=3D'STATS', uid=3D'***', pwd=3D'***') curs =3D conn.cursor() for i in range(100): =20 curs.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 print curs.fetchone() =20 =20 conn.close() conn2 =3D DB2.connect(dsn=3D'STATS', uid=3D'***', pwd=3D'***') curs2 =3D conn2.cursor() for i in range(100): =20 curs2.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 print curs2.fetchone() =20 =20 conn2.close() </code> - more than one cursor is created, along with a commit() in one script.=20 So this does not work: <code> import DB2 conn =3D DB2.connect(dsn=3D'STATS', uid=3D'***', pwd=3D'***') curs =3D conn.cursor() curs2 =3D conn.cursor() for i in range(100): =20 curs.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 print curs.fetchone() =20 =20 conn.commit() conn.close() </close> If I remove the commit() statement the code runs though. I can send a tra= ce if requested. I know that the above code looks silly - but this problem occurred as I w= as selecting from one database, and inserting to another. That's when I = started experimenting with=20 different combinations of things.=20 So this does not work: <code> import DB2 conn =3D DB2.connect(dsn=3D'STATS', uid=3D'***', pwd=3D'***') conn2 =3D DB2.connect(dsn=3D'GTS', uid=3D'***', pwd=3D'***') curs =3D conn.cursor() curs2 =3D conn2.cursor() for i in range(100): =20 curs.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 curs2.execute("INSERT INTO MQUSER.TEST1 VALUES(1);") =20 print curs.fetchone() conn.close() conn2.close() </code But this does - strange: <code> import DB2 conn =3D DB2.connect(dsn=3D'STATS', uid=3D'***', pwd=3D'***') conn2 =3D DB2.connect(dsn=3D'GTS', uid=3D'***', pwd=3D'***') curs =3D conn.cursor() curs2 =3D conn2.cursor() for i in range(100): =20 curs.execute("SELECT COUNT(*) FROM SYSIBM.SYSTABLES WITH UR;") =20 curs2.execute("INSERT INTO MQUSER.TEST1 VALUES(1);") =20 print curs.fetchone() =20 conn2.commit() conn.close() conn2.close() </code> I'm blasted for options at this stage. The route I have taken is to writ= e the INSERT queries to a file in the script, and then do the inserts fro= m the command line. My other options are to try and build the library with another compiler o= r even use a different version of python. Any help or advice would be appreciated. Thanks. H. _________________________________________________________________________= _________________________________________________________ Standard Bank Disclaimer and Confidentiality Note This e-mail, its attachments and any rights attaching hereto are, unless = the context clearly indicates otherwise, the property of Standard Bank Gr= oup Limited and/or its subsidiaries ("the Group"). It is confidential, private and in= tended for the addressee only. Should you not be the addressee and receiv= e this e-mail by mistake, kindly notify the sender, and delete this e-mail, immediately an= d do not disclose or use same in any manner whatsoever. Views and opinion= s expressed in this e-mail are those of the sender unless clearly stated as= =20those of the Group. The Group accepts no liability whatsoever for any = loss or damages whatsoever and howsoever incurred, or suffered, resulting, or ari= sing, from the use of this email or its attachments. The Group does not w= arrant the integrity of this e-mail nor that it is free of errors, viruses, interception or in= terference. Licensed divisions of the Standard Bank Group are authorised = financial services providers in terms of the Financial Advisory and Intermediary Services Act, No 37 o= f 2002 (FAIS). For information about the Standard Bank Group Limited visit our website h= ttp://www.standardbank.co.za _________________________________________________________________________= __________________________________________________________ |
From: Nuno M. R. <nmr...@gm...> - 2007-08-10 17:55:43
|
Hello all, How can I use DB2 with Python in autocommit mode? Passing autocommit=True in DB2.connect() fails. I'm using PyDB2-1.1.0-2. Regards, -- Nuno Rodrigues |
From: Lennart J. <len...@la...> - 2007-07-03 21:55:31
|
Daniel Cabrera wrote: > Hi, > > Do you know if I can use static o dynamic SQL sentences in Python? > Please could you show me how can I do it? > (sorry for my mail earlier David, didnt realize until now that I did not respond to the list) I'm not sure what you mean by static sql, are you looking for something in python that is similar to sqlj? If that is the case, not that I'm aware of (does not mean that it does not exist though :-). For the dynamic part, is the following snippet of any help? #!/usr/bin/python import DB2 username = 'XXXXXXX' password = 'XXXXXXX' dbname = 'LELLE' conn = DB2.connect(dsn=dbname,uid=username,pwd=password) sql_str = """ select colname from syscat.columns where tabschema = ? and tabname = ? """ c1 = conn.cursor() c1.execute(sql_str, ('SYSIBM','SYSDUMMY1')) for row in c1.fetchall(): print row[0] /Lennart [...] |
From: Daniel C. <cab...@gm...> - 2007-07-02 18:05:55
|
Hi, Do you know if I can use static o dynamic SQL sentences in Python? Please could you show me how can I do it? Thanks -- Daniel Cabrera Chaparro Noticias Interesantes de Linux en http://comulinux.blogspot.com/ |
From: Jeremy M. J. <zan...@be...> - 2007-05-04 09:43:19
|
OK - I was able to get everything installed and can import DB2 without errors. (Thanks everyone.) Can anyone point me to a doc for using pydb2? I read through the test_basic.py unit test script and found some help there, but it doesn't show me what I should be putting in the connect() method. It seems that dsn should be the hostname, uid should be the user id, and pwd should be the password. But somewhere I read that some option in the dsn should be a catalog name if you're connecting to an OS/390. Any tips? (BTW - I'm trying to connect to DB2 on an AS400). Thanks, - jmj |
From: Dan S. <de...@gm...> - 2007-05-01 11:53:47
|
For DB2 Version 8, you'll want the DB2 Application Development Client. For DB2 9, you should only need the DB2 Driver for ODBC and CLI (a much smaller download). If you still want the graphical tools, etc, then the DB2 Client is what you want. All downloads are available from http://www-1.ibm.com/support/docview.wss?rs=71&uid=swg27007053 You'll probably need to adjust the paths slightly if you're building against DB2 9. On 01/05/07, Jeremy M. Jones <zan...@be...> wrote: > When I start installing PyDB2, the first few messages are: > > """ > Your DB2 root is: /opt/IBM/db2/V8.1/ > WARNING: it seems that you did not install 'Application Development > Kit'. > Compilation may fail. > """ > > And then a bunch of error messages which seem consistent with a missing > SDK. I looked around for "DB2 Application Developer Kit" and "DB2 SDK", > but am not having much luck turning anything up. Does anyone have a > current link where I can download the SDK? > > Thanks, > > - jmj > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > -- Dan Scott Laurentian University |
From: Jeremy M. J. <zan...@be...> - 2007-05-01 11:33:37
|
When I start installing PyDB2, the first few messages are: """ Your DB2 root is: /opt/IBM/db2/V8.1/ WARNING: it seems that you did not install 'Application Development Kit'. Compilation may fail. """ And then a bunch of error messages which seem consistent with a missing SDK. I looked around for "DB2 Application Developer Kit" and "DB2 SDK", but am not having much luck turning anything up. Does anyone have a current link where I can download the SDK? Thanks, - jmj |
From: Daniel C. <cab...@gm...> - 2006-11-30 15:54:11
|
HI, i just installed PyDB2, but first i had to change script setup.py because path of lib is lib32, then i write import Db2 on python console, but i receive next error: Traceback (most recent call last): File "test/test_basic.py", line 2, in ? import DB2 File "/usr/lib/python2.4/site-packages/DB2.py", line 10, in ? import _db2 ImportError: libdb2.so.1: cannot open shared object file: No such file or directory Please could you help me with it? I'm using DB2 V9.0 (Viper) on Ubuntu Linux Thanx -- Daniel Cabrera Chaparro |
From: frank b. <fb...@ki...> - 2006-08-21 05:38:25
|
Am Mittwoch, 16. August 2006 12:31 schrieb Leons Petrazickis: > Hello, > > Is work being done to update PyDB2 so that it supports embedded XQuery and > the XML data type introduced in DB2 9? I'm working on that, but with less priority. Frank Balzer |
From: Leons P. <le...@ca...> - 2006-08-16 16:33:52
|
Hello, Is work being done to update PyDB2 so that it supports embedded XQuery and the XML data type introduced in DB2 9? Thanks, -- /* Leons Petrazickis * Database Technology Advocate * Developer Programs, IBM Information Management * Work: 905-413-2332 Mobile: 416-712-2042 * le...@ca... * IBM Certified Solution Developer - XML and Related Technologies * |
From: David K. <ka...@us...> - 2006-06-30 16:22:23
|
To answer my own posting: The reason I get all that horrendous error messaging was because the where condition caused no records to be returned. -Dave Katcoff 802-769-4162 |
From: David K. <ka...@us...> - 2006-06-30 00:38:20
|
I'm having trouble with the where condition when I execute a cursor. I get results without it. I've tried different field conditions also: >>> import DB2 >>> con = DB2.connect('BYDB2TST','maskaix','*******'') >>> cursor = con.cursor() >>> cursor.execute("select * from mopsdb2.jeolparms where ordrnum = '3191J'") <---Is fine without the where condition >>> cursor.fetch() Traceback (most recent call last): File "<interactive input>", line 1, in ? OperationalError: ('40003', -30020, '[IBM][CLI Driver][DB2] SQL30020N Execution failed because of a Distributed Protocol Error that will affect the successful execution of subsequent commands and SQL statements: Reason Code "0x1245". SQLSTATE=58009\r\n') >>> -Dave Katcoff 802-769-4162 |
From: David K. <ka...@us...> - 2006-06-25 09:27:30
|
Thx, Yuval - I've been reading the doc and successfully trying test cases. -Dave Katcoff 8-446-4162 Yuval Turgeman <yu...@ad...> To 06/25/2006 03:38 David Katcoff/Burlington/IBM@IBMUS AM cc pyd...@li... Subject Re: [PyDB2-discuss] installed - now need docs David Katcoff wrote: > Well, I bought VS2003, installed it, then ran "python setup.py build" and > it went - only one warning (_db2_modile.c(2087) : warning C4018: '<' : > signed/unsigned mismatch) - which I assume is innocuous (I hope). > Now, I need to figure out how to use it, but I have not been able to locate > any docs. I click docs/viw documantation in sourceforge.net and get > nothing. Can anyone guide me to get user doc info? Thx. > Hi, I don't know if my previous email got through, so here it is again... The DB2 module is (mostly) compliant with PEP 249 - "Python Database API Specification v2.0". (http://www.python.org/dev/peps/pep-0249/). If you need some examples, browse through - http://www.amk.ca/python/writing/DB-API.html Yuval. |
From: Yuval T. <yu...@ad...> - 2006-06-25 07:32:05
|
David Katcoff wrote: > Well, I bought VS2003, installed it, then ran "python setup.py build" and > it went - only one warning (_db2_modile.c(2087) : warning C4018: '<' : > signed/unsigned mismatch) - which I assume is innocuous (I hope). > Now, I need to figure out how to use it, but I have not been able to locate > any docs. I click docs/viw documantation in sourceforge.net and get > nothing. Can anyone guide me to get user doc info? Thx. > Hi, I don't know if my previous email got through, so here it is again... The DB2 module is (mostly) compliant with PEP 249 - "Python Database API Specification v2.0". (http://www.python.org/dev/peps/pep-0249/). If you need some examples, browse through - http://www.amk.ca/python/writing/DB-API.html Yuval. |
From: Dan S. <de...@gm...> - 2006-06-24 17:19:31
|
David: You have to catalog the server node and database first, then pass the name of the cataloged database as the first argument. Your acid test here is if you can connect to the database from the DB2 command line, you will be able to connect to the same database from PyDB2. See http://ibm.com/developerworks/db2/library/techarticle/0301chong/0301chong2.html for a reasonable explanation of the commands and libraries involved. Something like: C:\> db2 catalog tcpip node btvmanr remote btvmanr.btv.ibm.com server 446 C:\> db2 catalog database BYDB2MFG at node btvmanr authentication dcs ... should do the trick. Dan On 24/06/06, David Katcoff <ka...@us...> wrote: > On windows/XP, trying to connect to OS mainframe domain with > import DB2 > con = DB2.Connection('btvmanr.btv.ibm.com:446/BYDB2MFG','user','pw') > > get: > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > File "DB2.py", line 271, in __init__ > self._db = _db2.connect(*args, **kwargs) > DatabaseError: ('HY009', -99999, '[IBM][CLI Driver] CLI0124E Invalid > argument value. SQLSTATE=HY009') > > Obviously I'm not passing the right dsn. I'm using the same dsn as on AIX > java, without the jdbc:db2: prefix, but the same port. I successfully > connected to btvmanr using config mgr with db2 8.1. > > -Dave Katcoff 802-769-4162 > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > PyDB2-discuss mailing list > PyD...@li... > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > |