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: Pratik M. <pm...@ac...> - 2005-09-19 22:49:10
|
Hi, I downloaded and untarred (using Cygwin) PyDB2-1.1.0 available on Sourceforge on a Windows XP system and then ran 'python setup.py build' I get the following message which is the same as posted on sourceforge bugs list by someone else a month ago. $ python setup.py build Your DB2 root is: C:\Program Files\IBM\SQLLIB\ running build running build_py running build_ext building '_db2' extension C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG "-IC:\Program Files\IBM\SQLLIB\include" -Ic:\Python24\include -Ic:\Python24\PC /Tc_db2_module.c /Fobuild\temp.win32-2.4\Release\_db2_module.obj _db2_module.c _db2_module.c(1855) : error C2036: 'SQLPOINTER' : unknown size _db2_module.c(2087) : warning C4018: '<' : signed/unsigned mismatch Any ideas as to how to resolve this issue. Best regards, Pratik Mehta |
From: Yuval T. <yu...@ad...> - 2005-07-14 11:24:13
|
Hi, The new module raises a _db2.Error when the db2 returns SQL0000W after .execute() (see http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/core/rsql0500.htm ) According to the DB2 documentation, codes can end with W, C, and N. Meaning "Warning or informational messages", "Critical system errors", and "Error messages (don't know why 'N')" In the previous versions, this was simply ignored: if (rc1 != SQL_NO_DATA && rc1 != SQL_SUCCESS) { /* XXX need to cope with SQL_SUCCESS_WITH_INFO */ return DB2_report_error(self); } ... etc ... So, since this is a warning, I think the best fix would be to add the warning to the messages member rather than raising an error. It's an easy one to fix: ------------- snip ------------ --- v1.1/_db2_module.c 2005-03-09 03:34:48.000000000 +0200 +++ v1.1-devel/_db2_module.c 2005-07-14 14:19:13.537755000 +0300 @@ -1062,7 +1062,7 @@ DB2CursorObj_execute(DB2CursorObj *self, if (rc == SQL_SUCCESS) { ; - } else if (rc == SQL_SUCCESS_WITH_INFO) { + } else if (rc == SQL_SUCCESS_WITH_INFO || rc == SQL_NO_DATA_FOUND) { _DB2CursorObj_fill_Cursor_messages(self); } else { return _DB2CursorObj_Cursor_Error(self, NULL); ------------- snip ------------ This will append the warning to the cursor.messages: >>> c.messages [(<class _db2.Warning at 0x815c6ac>, ('02000', 100, '[IBM][CLI Driver][DB2/LINUX ] SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a que ry is an empty table. SQLSTATE=02000\n'))] >>> I think we should set up a nice and simple html site in pydb2.sf.net and a working cvs... What do you think? Thanks, Yuval. |
From: Yuval T. <yu...@ad...> - 2005-07-11 08:16:42
|
??? wrote: >Hi~ everyone, > >I've just refactored the module and uploaded to ftp://people.linuxkorea.co.kr/pub/DB2/src. >Can you please review the source code? > >I'm sure that this version is much better than the previous one. >It includes unittest code now. > >Sooner or later, I would like to upload this version to sf.net. > > This looks like a very nice release! Here's a list of non-standard features I was using in the previous module that have changed (and broke my code) :) 1. Connection object: removed .autocommit() function (Python DB API: constructor kwarg "autoCommit" for db specific parameters). 2. Missing DB2.CLOB type (Python DB API: describing very large columns should be done using DB2.Binary). 3. Fetchone returns a list rather than a tuple (Python DB API: "fetchone()" returns a sequence) I didn't have much time to dedicate for this project lately (sorry)... I am just starting to test the new module now. It looks very promising, I'll tell you how it goes. Thanks, -- Yuval Turgeman Content Technology, Aduva LTD. |
From: Jaco S. <jac...@cl...> - 2005-07-05 06:35:23
|
--- setup.py 2005-06-29 09:32:27.316161600 -0400=0A+++ setup.py.new 2005-07= -04 18:30:35.035497600 -0400=0A@@ -8,23 +8,23 @@=0A import sys=0A import os= =0A =0A-# specifiy your DB2 root if auto-find doesn't work=0A+# specify you= r DB2 root if auto-find doesn't work=0A # (with trailing /)=0A-# ex) DB2=5F= ROOT =3D "/opt/IBM/db2/V8.1/"=0A-DB2=5FROOT =3D ""=0A+# ex) DB2DIR =3D "/op= t/IBM/db2/V8.1/"=0A+DB2DIR =3D os.environ['DB2=5FHOME']=0A =0A-def get=5Fdb= 2=5Froot():=0A- for v in [ '/opt/IBM/db2', '/usr/IBMdb2' ]:=0A+def get=5Fdb= 2=5Froot(dirs =3D [ '/opt/IBM/db2', '/usr/IBMdb2' ]):=0A+ for v in dirs:=0A= if os.path.exists(v):=0A files =3D os.listdir(v)=0A for vv in file= s:=0A if vv[:1] =3D=3D "V" and vv.find(".") > 0:=0A return "%s/%s/= " % (v, vv)=0A else:=0A- return DB2=5FROOT=0A+ return DB2DIR=0A =0A if s= ys.platform[:5] =3D=3D 'win32': # Win32=0A- db2=5Froot=5Fdir =3D 'C:\\Progr= am Files\\SQLLIB\\'=0A+ db2=5Froot=5Fdir =3D get=5Fdb2=5Froot(['C:/Program = Files/SQLLIB/'])=0A db2lib =3D 'db2cli'=0A else:=0A db2=5Froot=5Fdir =3D = get=5Fdb2=5Froot()=0A= |
From: Dan S. <de...@gm...> - 2005-07-04 22:35:53
|
Attached is a small patch for setup.py to hopefully improve the build experience on both Windows and on UNIX (DB2DIR is the environment variable exported by ~/sqllib/db2profile, and because DB2 allows you to install into any directory on Windows I thought it made sense to support alternate install directories using the same mechanism). Now to actually put the code through its paces :) Dan On 3/8/05, ??? <yo...@li...> wrote: > =20 > Oh, I've forgot to fix the notorious timestamp bug about the fraction par= t=20 > :-(=20 > =20 > I think I've fixed the bug right now and uploaded to the same place.=20 > You can get by anonymous ftp at > people.linuxkorea.co.kr/pub/DB2/src.=20 > The filename is the same as the previous one.=20 > =20 > Can you please check this for me?=20 > =20 > Thanks.=20 > =20 > FYI, I've include the ugly part related to timestamp string building:=20 > =20 > case SQL_C_TYPE_TIMESTAMP: > timestampSt =3D *(TIMESTAMP_STRUCT *)(buf); > size =3D 26 + 1; > tempStr =3D (char *) MY_MALLOC(size); > memset(tempStr, 0, size); > sprintf(tempStr, > =20 > "%04d-%02d-%02d-%02d.%02d.%02d.", > timestampSt.year, > timestampSt.month, > timestampSt.day, > timestampSt.hour, > timestampSt.minute, > timestampSt.second);=20 > =20 > /* ffffff part */=20 > =20 > fractionPart =3D (char *)MY_MALLOC(size); > memset(fractionPart, 0, size); > sprintf(fractionPart, "%09d", (unsigned > int)timestampSt.fraction); > fractionPart[6] =3D '\0'; > strcat(tempStr, fractionPart);=20 > =20 > /* val =3D > PyString_FromStringAndSize(tempStr, 26); */ /* paranoid? */ > val =3D PyString_FromString(tempStr);=20 > =20 > MY_FREE(tempStr); > MY_FREE(fractionPart);=20 > =20 > break; > =20 > =20 > ----- Original Message -----=20 > From: Jaco Smuts=20 > To: ???=20 > Cc: Dan Scott ; pyd...@li... ; > pyd...@li...=20 > Sent: Wednesday, March 09, 2005 1:30 AM=20 > Subject: Re: [PyDB2-discuss] New release on sourceforge?=20 >=20 >=20 > I know little about C, but I'll gladly test it using some db2 scripts I u= se > at work=20 >=20 > does this codebase address the timestamp issue (there is a patch for it) = ?=20 >=20 >=20 >=20 >=20 > =20 > "???" <yo...@li...>=20 > Sent by: pyd...@li...=20 >=20 > 2005/03/08 02:29 PM=20 > =20 > To "Dan Scott" <de...@gm...>, > <pyd...@li...>=20 > =20 > cc=20 > =20 > Subject Re: [PyDB2-discuss] New release on sourceforge? > =20 > =20 >=20 >=20 >=20 > Hi~ everyone, >=20 > I've just refactored the module and uploaded to > ftp://people.linuxkorea.co.kr/pub/DB2/src. > Can you please review the source code? >=20 > I'm sure that this version is much better than the previous one. > It includes unittest code now. >=20 > Sooner or later, I would like to upload this version to sf.net. >=20 > ----- Original Message -----=20 > From: "Dan Scott" <de...@gm...> > To: <pyd...@li...> > Sent: Tuesday, February 01, 2005 6:20 AM > Subject: Re: [PyDB2-discuss] New release on sourceforge? >=20 >=20 > > On Mon, 31 Jan 2005 17:12:00 +0900, ??? <yo...@li...> wrote: > >> Hi Dan, > >>=20 > >> ----- Original Message ----- > >> From: "Dan Scott" <de...@gm...> > >> To: <pyd...@li...> > >> Sent: Sunday, January 30, 2005 5:24 AM > >> Subject: Re: [PyDB2-discuss] New release on sourceforge? > >>=20 > >>=20 > >> > Hi Yuval, Man-Yong: > >> > > >> > Any chance of that 1.0 release happening? > >>=20 > >> Yuval, I want you to release 1.0. In fact, I don't know how to releas= e a > new version in sf.net. > >=20 > > Yuval, when you create the release, let me know and I'll update the > > Python Package Index entry for the project. > >=20 > >> > Also, it would be a really nice follow-up if Man-Yong could produce > >> > the win32 binaries for the relatively recent Python 2.4 release. > >>=20 > >> Sure. > >=20 > > Excellent! > >=20 > >> > When you start developing the 1.1 branch, would you consider > >> > instituting a basic Contributor License Agreement (CLA) like Eclipse > >> > and Apache do? The CLA is a legal process that asks would-be > >> > contributors & the contributors' employers to sign off on a form > >> > stating that the code they are contributing is rightfully theirs to > >> > contribute -- basically a way of avoiding any contributions from sha= dy > >> > sources. > >> > > >> > My employer is a bit wary of projects that don't hava a CLA process, > >> > so I can't be too useful to the effort without it :( Unless you call > >> > sending requests and little reminder notes to the mailing list > >> > useful... > >> > > >> > Dan > >>=20 > >> Of course! > >=20 > > That's great! For further information on the Contributor Licensing > > Agreement (Python itself adopted a CLA process earlier this month) you > > can look at http://www.python.org/psf/contrib.html > >=20 > > This is really exciting; with these steps in place I think this > > project will really take off and become more active again. |
From: ??? <yo...@li...> - 2005-03-09 01:46:41
|
T2gsIEkndmUgZm9yZ290IHRvIGZpeCB0aGUgbm90b3Jpb3VzIHRpbWVzdGFtcCBidWcgYWJvdXQg dGhlIGZyYWN0aW9uIHBhcnQgIDotKA0KDQpJIHRoaW5rIEkndmUgZml4ZWQgdGhlIGJ1ZyByaWdo dCBub3cgYW5kIHVwbG9hZGVkIHRvIHRoZSBzYW1lIHBsYWNlLg0KWW91IGNhbiBnZXQgYnkgYW5v bnltb3VzIGZ0cCBhdCBwZW9wbGUubGludXhrb3JlYS5jby5rci9wdWIvREIyL3NyYy4NClRoZSBm aWxlbmFtZSBpcyB0aGUgc2FtZSBhcyB0aGUgcHJldmlvdXMgb25lLg0KDQpDYW4geW91IHBsZWFz ZSBjaGVjayB0aGlzIGZvciBtZT8NCg0KVGhhbmtzLg0KDQpGWUksIEkndmUgaW5jbHVkZSB0aGUg dWdseSBwYXJ0IHJlbGF0ZWQgdG8gdGltZXN0YW1wIHN0cmluZyBidWlsZGluZzoNCg0KICAgICAg ICBjYXNlIFNRTF9DX1RZUEVfVElNRVNUQU1QOg0KICAgICAgICAgICAgICAgIHRpbWVzdGFtcFN0 ID0gKihUSU1FU1RBTVBfU1RSVUNUICopKGJ1Zik7DQogICAgICAgICAgICAgICAgc2l6ZSA9IDI2 ICsgMTsNCiAgICAgICAgICAgICAgICB0ZW1wU3RyID0gKGNoYXIgKikgTVlfTUFMTE9DKHNpemUp Ow0KICAgICAgICAgICAgICAgIG1lbXNldCh0ZW1wU3RyLCAwLCBzaXplKTsNCiAgICAgICAgICAg ICAgICBzcHJpbnRmKHRlbXBTdHIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIl MDRkLSUwMmQtJTAyZC0lMDJkLiUwMmQuJTAyZC4iLA0KICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB0aW1lc3RhbXBTdC55ZWFyLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICB0aW1lc3RhbXBTdC5tb250aCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlt ZXN0YW1wU3QuZGF5LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXBT dC5ob3VyLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXBTdC5taW51 dGUsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcFN0LnNlY29uZCk7 DQoNCiAgICAgICAgICAgICAgICAvKiBmZmZmZmYgcGFydCAqLw0KDQogICAgICAgICAgICAgICAg ZnJhY3Rpb25QYXJ0ID0gKGNoYXIgKilNWV9NQUxMT0Moc2l6ZSk7DQogICAgICAgICAgICAgICAg bWVtc2V0KGZyYWN0aW9uUGFydCwgMCwgc2l6ZSk7DQogICAgICAgICAgICAgICAgc3ByaW50Zihm cmFjdGlvblBhcnQsICIlMDlkIiwgKHVuc2lnbmVkIGludCl0aW1lc3RhbXBTdC5mcmFjdGlvbik7 DQogICAgICAgICAgICAgICAgZnJhY3Rpb25QYXJ0WzZdID0gJ1wwJzsNCiAgICAgICAgICAgICAg ICBzdHJjYXQodGVtcFN0ciwgZnJhY3Rpb25QYXJ0KTsNCg0KICAgICAgICAgICAgICAgIC8qIHZh bCA9IFB5U3RyaW5nX0Zyb21TdHJpbmdBbmRTaXplKHRlbXBTdHIsIDI2KTsgKi8gLyogcGFyYW5v aWQ/ICovDQogICAgICAgICAgICAgICAgdmFsID0gUHlTdHJpbmdfRnJvbVN0cmluZyh0ZW1wU3Ry KTsNC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gaW4gcGxhY2Ug SSB0aGluayB0aGlzDQo+IHByb2plY3Qgd2lsbCByZWFsbHkgdGFrZSBvZmYgYW5kIGJlY29tZSBt b3JlIGFjdGl2ZSBhZ2Fpbi4NCj4gDQo+IA0KPiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQo+IFRoaXMgU0YuTmV0IGVtYWlsIGlzIHNwb25z b3JlZCBieTogSW50ZWxsaVZJRVcgLS0gSW50ZXJhY3RpdmUgUmVwb3J0aW5nDQo+IFRvb2wgZm9y IG9wZW4gc291cmNlIGRhdGFiYXNlcy4gQ3JlYXRlIGRyYWctJi1kcm9wIHJlcG9ydHMuIFNhdmUg dGltZQ0KPiBieSBvdmVyIDc1JSEgUHVibGlzaCByZXBvcnRzIG9uIHRoZSB3ZWIuIEV4cG9ydCB0 byBET0MsIFhMUywgUlRGLCBldGMuDQo+IERvd25sb2FkIGEgRlJFRSBjb3B5IGF0IGh0dHA6Ly93 d3cuaW50ZWxsaXZpZXcuY29tL2dvL29zZG5fbmwNCj4gX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX18NCj4gUHlEQjItZGlzY3VzcyBtYWlsaW5nIGxpc3QNCj4g UHlEQjItZGlzY3Vzc0BsaXN0cy5zb3VyY2Vmb3JnZS5uZXQNCj4gaHR0cHM6Ly9saXN0cy5zb3Vy Y2Vmb3JnZS5uZXQvbGlzdHMvbGlzdGluZm8vcHlkYjItZGlzY3Vzcw0KPg== |
From: Torre de l. J. <j....@BG...> - 2005-03-07 17:32:06
|
Hi all, Trying to make pydb2 in my project I had to make a little change in the = code. I need to use parameters in the SQL statements but they seem not work = very fine. The type detection of the parameters does not work properly = with Unicode strings. That's why I changed in line 464 of DB2.py where it says: elif type(q) =3D=3D type(''): for elif type(q) =3D=3D type(unicode(' ')): If not the Unicode strings are not detected as strings and not embrace = with '' in the SQL statements. Is that Ok? Cheers. Javier de la Torre Botanic Garden and Botanical Museum Berlin Dahlem. FUB Department of Biodiversity Informatics and Laboratories K=F6nigin-Luise-Str 6-8, D - 14191 Berlin email j....@bg... phone +49(30) 838-50284=20 URL http://www.bgbm.org/torre =20 |
From: Torre de l. J. <j....@BG...> - 2005-03-07 17:28:32
|
Hi all, This is my first message to the mailing list. I've tried to find an answer to my problems in the archive but I did not succeed. So, here it goes: I am getting an error "SQLSTATE 01517 - A character that could not be converted was replaced with a substitute character" when doing a search trough pydb2. The same SQL works fine trough the Control center. I've read in a web page that I have to set the appropiate value for db2codepage in the client. I am not sure what this mean, but I suposse it has do something with setting up my database as UTF-8. I am using a Windows XP environment with DB2 v8.1.7.445 (SQL08020) Personal Developer Edition. Does anyone have this problem? Thanks in avance. Javier de la Torre. |
From: Dan S. <de...@gm...> - 2005-01-31 21:21:08
|
On Mon, 31 Jan 2005 17:12:00 +0900, ??? <yo...@li...> wrote: > Hi Dan, > > ----- Original Message ----- > From: "Dan Scott" <de...@gm...> > To: <pyd...@li...> > Sent: Sunday, January 30, 2005 5:24 AM > Subject: Re: [PyDB2-discuss] New release on sourceforge? > > > > Hi Yuval, Man-Yong: > > > > Any chance of that 1.0 release happening? > > Yuval, I want you to release 1.0. In fact, I don't know how to release a new version in sf.net. Yuval, when you create the release, let me know and I'll update the Python Package Index entry for the project. > > Also, it would be a really nice follow-up if Man-Yong could produce > > the win32 binaries for the relatively recent Python 2.4 release. > > Sure. Excellent! > > When you start developing the 1.1 branch, would you consider > > instituting a basic Contributor License Agreement (CLA) like Eclipse > > and Apache do? The CLA is a legal process that asks would-be > > contributors & the contributors' employers to sign off on a form > > stating that the code they are contributing is rightfully theirs to > > contribute -- basically a way of avoiding any contributions from shady > > sources. > > > > My employer is a bit wary of projects that don't hava a CLA process, > > so I can't be too useful to the effort without it :( Unless you call > > sending requests and little reminder notes to the mailing list > > useful... > > > > Dan > > Of course! That's great! For further information on the Contributor Licensing Agreement (Python itself adopted a CLA process earlier this month) you can look at http://www.python.org/psf/contrib.html This is really exciting; with these steps in place I think this project will really take off and become more active again. |
From: ??? <yo...@li...> - 2005-01-31 08:12:21
|
SGkgRGFuLA0KDQotLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tIA0KRnJvbTogIkRhbiBTY290 dCIgPGRlbmlhbHNAZ21haWwuY29tPg0KVG86IDxweWRiMi1kaXNjdXNzQGxpc3RzLnNvdXJjZWZv cmdlLm5ldD4NClNlbnQ6IFN1bmRheSwgSmFudWFyeSAzMCwgMjAwNSA1OjI0IEFNDQpTdWJqZWN0 OiBSZTogW1B5REIyLWRpc2N1c3NdIE5ldyByZWxlYXNlIG9uIHNvdXJjZWZvcmdlPw0KDQoNCj4g SGkgWXV2YWwsIE1hbi1Zb25nOg0KPiANCj4gQW55IGNoYW5jZSBvZiB0aGF0IDEuMCByZWxlYXNl IGhhcHBlbmluZz8NCg0KWXV2YWwsIEkgd2FudCB5b3UgdG8gcmVsZWFzZSAxLjAuICBJbiBmYWN0 LCBJIGRvbid0IGtub3cgaG93IHRvIHJlbGVhc2UgYSBuZXcgdmVyc2lvbiBpbiBzZi5uZXQuDQoN Cj4gQWxzbywgaXQgd291bGQgYmUgYSByZWFsbHkgbmljZSBmb2xsb3ctdXAgaWYgTWFuLVlvbmcg Y291bGQgcHJvZHVjZQ0KPiB0aGUgd2luMzIgYmluYXJpZXMgZm9yIHRoZSByZWxhdGl2ZWx5IHJl Y2VudCBQeXRob24gMi40IHJlbGVhc2UuDQoNClN1cmUuDQoNCj4gV2hlbiB5b3Ugc3RhcnQgZGV2 ZWxvcGluZyB0aGUgMS4xIGJyYW5jaCwgd291bGQgeW91IGNvbnNpZGVyDQo+IGluc3RpdHV0aW5n IGEgYmFzaWMgQ29udHJpYnV0b3IgTGljZW5zZSBBZ3JlZW1lbnQgKENMQSkgbGlrZSBFY2xpcHNl DQo+IGFuZCBBcGFjaGUgZG8/IFRoZSBDTEEgaXMgYSBsZWdhbCBwcm9jZXNzIHRoYXQgYXNrcyB3 b3VsZC1iZQ0KPiBjb250cmlidXRvcnMgJiB0aGUgY29udHJpYnV0b3JzJyBlbXBsb3llcnMgdG8g c2lnbiBvZmYgb24gYSBmb3JtDQo+IHN0YXRpbmcgdGhhdCB0aGUgY29kZSB0aGV5IGFyZSBjb250 cmlidXRpbmcgaXMgcmlnaHRmdWxseSB0aGVpcnMgdG8NCj4gY29udHJpYnV0ZSAtLSBiYXNpY2Fs bHkgYSB3YXkgb2YgYXZvaWRpbmcgYW55IGNvbnRyaWJ1dGlvbnMgZnJvbSBzaGFkeQ0KPiBzb3Vy Y2VzLg0KPiANCj4gTXkgZW1wbG95ZXIgaXMgYSBiaXQgd2FyeSBvZiBwcm9qZWN0cyB0aGF0IGRv bid0IGhhdmEgYSBDTEEgcHJvY2VzcywNCj4gc28gSSBjYW4ndCBiZSB0b28gdXNlZnVsIHRvIHRo ZSBlZmZvcnQgd2l0aG91dCBpdCA6KCBVbmxlc3MgeW91IGNhbGwNCj4gc2VuZGluZyByZXF1ZXN0 cyBhbmQgbGl0dGxlIHJlbWluZGVyIG5vdGVzIHRvIHRoZSBtYWlsaW5nIGxpc3QNCj4gdXNlZnVs Li4uDQo+IA0KPiBEYW4NCg0KT2YgY291cnNlIQ0KDQpIYXZlIGEgbmljZSBkYXl+DQo= |
From: Dan S. <de...@gm...> - 2005-01-29 20:24:43
|
Hi Yuval, Man-Yong: Any chance of that 1.0 release happening? Also, it would be a really nice follow-up if Man-Yong could produce the win32 binaries for the relatively recent Python 2.4 release. When you start developing the 1.1 branch, would you consider instituting a basic Contributor License Agreement (CLA) like Eclipse and Apache do? The CLA is a legal process that asks would-be contributors & the contributors' employers to sign off on a form stating that the code they are contributing is rightfully theirs to contribute -- basically a way of avoiding any contributions from shady sources. My employer is a bit wary of projects that don't hava a CLA process, so I can't be too useful to the effort without it :( Unless you call sending requests and little reminder notes to the mailing list useful... Dan On Thu, 20 Jan 2005 17:51:38 +0200, Yuval Turgeman <yu...@ad...> wrote: > Dan Scott wrote: > > >Sounds like a good basis for a 1.0 release! > > > >The only thing that confuses me with the current release is exception > >handling; the Python DB-API 2.0 documents a fairly clean hierarchy of > >exceptions and warnings, but I've never been able to catch one of > >those exceptions (_db2.error). Maybe it's just me :) > > > > > Hehe... it's not just you, the current error handling is far from being > complete... my favorite is "an error occurred but I dont know why" ;-) > > >That might be an interesting direction to explore. I'm a little > >worried that the performance would suffer in comparison to a native > >implementation based on SQLPrepare() / SQLExecute() / SQLFetchScroll() > >-- but hey, the proof is always in the code :) > > > > > We would still use those functions (I think we have to, according to the > Db2 api). The only difference is that we'll have a connection object > which implements a "query()" method, which does the actual query (using > the functions you mentioned), and a result object, exactly like MySQLdb > (i really it)... that's at least what I had in mind... :) > > >There have been no major changes in the DB2 CLI API in V8.2 that I'm > >aware of; that API tends to stay pretty stable. The minor changes to > >the API documentation for V8.2 have been marked with a 7 in the > >left-hand margin in the DB2 Information Center: for example, > >SQLConnect(): http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/ad/r0000575.htm > > > > > Cool, I'll read about it a little also. > > Thanks! > > -- > Yuval Turgeman > Content Technology, Aduva LTD. > > |
From: Preston L. <pla...@jo...> - 2005-01-20 16:06:26
|
It sounds like there may be a new release of the PyDB2 module coming up soon... Is there any interest in accepting this patch to handle the SQL_SUCCESS_WITH_INFO state? Not handling this is kind of a release critical bug for PyDB2 as used in my company, since a valid query in my app produces this result. I should have access to check it in through my Sourceforge account (planders) I just haven't gotten to it yet. There was also some concern about the handling of the "info". I was stashing it in the LastWarningString variable. Primitive, I know, but I don't have any better ideas at this point. thanks, Preston Landers (512) 225-3929 | pla...@jo... | "For 'tis the sport to have the enginer Senior Software Developer | Hoist with his owne petar" Journyx, Austin, Texas, USA | -- Shakespeare, Hamlet III iv. ---------- Forwarded message ---------- Date: Thu, 15 Jan 2004 11:12:33 -0600 (CST) From: Preston Landers <pla...@jo...> To: pyd...@li... Subject: [PyDB2-discuss] Re: I have a patch to handle SQL_SUCCESS_WITH_INFO On Wed, 14 Jan 2004, Preston Landers wrote: > We ran into a situation recently where we wanted to use a certain > construct in DB2 that was generating the SQL0347W warning about recursion. > The DB2.py driver was raising this non-fatal warning as a error (and not > returning the result rows.) > > Digging a bit deeper I found that this is the SQL_SUCCESS_WITH_INFO result > code. The current driver (_db2_module.c) has a comment to the effect of > "need to cope with SQL_SUCCESS_WITH_INFO." > > I took what seemed to me to be the most simple and direct route to fix > this problem. I simply added a 'LastWarningString' attribute to the > internal cursor object. This is cleared before every statement execution. > If SQL_SUCCESS_WITH_INFO is encountered then LastWarningString is updated > with the warning text, and the result rows are returned. > > It is then up to the caller to check LastWarningString after every query > if they care about that. I also made a minor change in DB2.py BaseCursor > class to copy over the LastWarningString in _refresh_info(). Attached are the three files that I modified to make this change. _db2_module.c -- handle SQL_SUCCESS_WITH_INFO by setting the warning to a cursor variable LastWarningString DB2.py -- copy over LastWarningString in _refresh_info(). Also changed 'x in dict' Python 2.2 syntax to the equivelent has_key() so it will work with Py 2.1. README -- just added a note about checking LastWarningString By the way, my Sourceforge account is 'planders'. thanks, --- Preston Landers - pla...@jo... Senior Software Developer, Journyx, Inc. Austin, Texas (512) 225-3929 |
From: Yuval T. <yu...@ad...> - 2005-01-20 15:50:06
|
Dan Scott wrote: >Sounds like a good basis for a 1.0 release! > >The only thing that confuses me with the current release is exception >handling; the Python DB-API 2.0 documents a fairly clean hierarchy of >exceptions and warnings, but I've never been able to catch one of >those exceptions (_db2.error). Maybe it's just me :) > > Hehe... it's not just you, the current error handling is far from being complete... my favorite is "an error occurred but I dont know why" ;-) >That might be an interesting direction to explore. I'm a little >worried that the performance would suffer in comparison to a native >implementation based on SQLPrepare() / SQLExecute() / SQLFetchScroll() >-- but hey, the proof is always in the code :) > > We would still use those functions (I think we have to, according to the Db2 api). The only difference is that we'll have a connection object which implements a "query()" method, which does the actual query (using the functions you mentioned), and a result object, exactly like MySQLdb (i really it)... that's at least what I had in mind... :) >There have been no major changes in the DB2 CLI API in V8.2 that I'm >aware of; that API tends to stay pretty stable. The minor changes to >the API documentation for V8.2 have been marked with a 7 in the >left-hand margin in the DB2 Information Center: for example, >SQLConnect(): http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/ad/r0000575.htm > > Cool, I'll read about it a little also. Thanks! -- Yuval Turgeman Content Technology, Aduva LTD. |
From: Yuval T. <yu...@ad...> - 2005-01-20 11:50:34
|
Hello, >I agree with you, Yuval. I think we should release the current CVS as v1.0 (stable?) >and start a new branch as v1.1 (development version) > > What we have until now is pretty stable (AFAIK). All the (known) bugs are fixed (segfaults, leaks, etc.). So, yeah we could release it as 1.0 and start working on the next generation, making sure it's fully compliant with python's DB-API (i'm not sure the current module is fully compliant). >Yuval, have you started a new db2 module coding or have any idea what a new db2 module >should be? > > Yes, I have, actually... I started implementing a MySQLdb-like module, which means implementing the basics in C (connection object, errors) and all the rest (connection object wrappers, cursors, converters, etc.) in python. This would help us with all the ref. counting problems we had in the past (like the problem we had with the cyclic dep. between the cursor object and connection object for example). >I'm setting up DB2 v8.2 system right now. > > Any changes in the DB2 API for 8.2 ? -- Yuval Turgeman Content Technology, Aduva LTD. |
From: ??? <yo...@li...> - 2005-01-20 10:07:31
|
SGkNCg0KLS0tLS0gT3JpZ2luYWwgTWVzc2FnZSAtLS0tLSANCkZyb206ICJZdXZhbCBUdXJnZW1h biIgPHl1dmFsQGFkdXZhLmNvbT4NClRvOiAiUGF0cmljayBLLiBPJ0JyaWVuIiA8cG9icmllbkBv cmJ0ZWNoLmNvbT4NCkNjOiAiRGFuIFNjb3R0IiA8ZGVuaWFsc0BnbWFpbC5jb20+OyA8cHlkYjIt ZGlzY3Vzc0BsaXN0cy5zb3VyY2Vmb3JnZS5uZXQ+DQpTZW50OiBUaHVyc2RheSwgSmFudWFyeSAy MCwgMjAwNSA2OjI0IFBNDQpTdWJqZWN0OiBSZTogW1B5REIyLWRpc2N1c3NdIE5ldyByZWxlYXNl IG9uIHNvdXJjZWZvcmdlPw0KDQoNCj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u...@ad...> - 2005-01-20 09:22:59
|
Patrick K. O'Brien wrote: > Dan Scott wrote: > >> Patrick et al: >> >> I just wanted to request that the code in CVS HEAD be released as a >> formal point release for pyDB2. The 0.996a release is so unstable that >> it's almost unusable, but the latest code in CVS cleans up the >> segfault conditions I had been running into in my tests. >> >> This would also bring the source code release closer to being in line >> with the Windows binary build hosted on Man-Yong Lee's FTP site (which >> is listed as 0.998). > > > I'm more than happy to give anyone who volunteers access to the CVS > repository and SourceForge tools so that a formal release can be made. > Since I'm not actively using DB2, I'd rather someone else step > forward. If you would like to volunteer, just give me your > SourceForge account name and I'll set you up. Anyone? > I also think it's about time we release a new version... I wouldn't mind doing that (you already gave me release privileges). -- Yuval Turgeman Content Technology, Aduva LTD. |
From: Patrick K. O'B. <po...@or...> - 2005-01-20 03:02:26
|
Dan Scott wrote: > Patrick et al: > > I just wanted to request that the code in CVS HEAD be released as a > formal point release for pyDB2. The 0.996a release is so unstable that > it's almost unusable, but the latest code in CVS cleans up the > segfault conditions I had been running into in my tests. > > This would also bring the source code release closer to being in line > with the Windows binary build hosted on Man-Yong Lee's FTP site (which > is listed as 0.998). I'm more than happy to give anyone who volunteers access to the CVS repository and SourceForge tools so that a formal release can be made. Since I'm not actively using DB2, I'd rather someone else step forward. If you would like to volunteer, just give me your SourceForge account name and I'll set you up. Anyone? -- Patrick K. O'Brien Orbtech http://www.orbtech.com Schevo http://www.schevo.org Pypersyst http://www.pypersyst.org |
From: Dan S. <de...@gm...> - 2005-01-20 02:34:50
|
Patrick et al: I just wanted to request that the code in CVS HEAD be released as a formal point release for pyDB2. The 0.996a release is so unstable that it's almost unusable, but the latest code in CVS cleans up the segfault conditions I had been running into in my tests. This would also bring the source code release closer to being in line with the Windows binary build hosted on Man-Yong Lee's FTP site (which is listed as 0.998). Dan |
From: Dan S. <de...@gm...> - 2004-12-09 04:47:40
|
Hi Man-Yong: Well, pyDB2 has filled a heck of a gap in the meantime, and I thank you for it. In theory, nextset() should be relatively easy to implement at least; in CLI/ODBC you could call SQLMoreResults() ( http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/ad/r0000628.htm) and either set the Python Cursor object to None if the result is SQL_NO_DATA_FOUND or prepare the Cursor object to fetch the next result set if the result is SQL_SUCCESS. Dan On Mon, 6 Dec 2004 14:35:38 +0900, ??? <yo...@li...> wrote: > Hi~ > > Currently, stored procedure support in PyDB2 is incomplete and not tested thoroughly. > As you can see, nextset() method is missing now. > > PyDB2 needs severe reworking right now, 'cause it was started just for my project's need > and most of all, I'm not a DB2 specialist. Personally, I haven't used any stored procedure in my real projects :( > > You know we can get lots of hints from other Python database modules like MySQLdb and DCOracle*. > After reviewing them, I can start coding afresh, I think. > > Thanks, > Man-Yong > > > > ----- Original Message ----- > From: "Dan Scott" <de...@gm...> > To: <pyd...@li...> > Sent: Sunday, December 05, 2004 1:58 PM > Subject: [PyDB2-discuss] Calling stored procedures > > > Hi: > > > > I noticed there is no documentation in the README about stored > > procedure support, so I went ahead to try it out according to the > > interface defined by PEP249. > > > > Env: DB2 V8.2, Windows XP, Python 2.3, pyDB2 0.998a installed from > > Man-Yong Lee's binary. > > > > I started by creating a simple SQL stored procedure to test the INOUT > > parameter support: > > > > CREATE PROCEDURE test_date(INOUT date DATE) > > BEGIN > > SET date = '2007-01-05'; > > END > > > > ... then called it from the following method: > > > > def call_procedure_inout(conn): > > """ > > Call a procedure that accepts one INOUT DATE parameter. > > """ > > > > curs=conn.cursor() > > stmt = 'TEST_DATE' > > parm = ('2004-12-02') > > # parm = ('10/27/1991') > > res = curs.callproc(stmt, parm) > > return res > > > > The expected return value would be '2007-01-05', but I get an error instead: > > > > ***** > > File "C:\local\python2.3\Lib\site-packages\DB2.py", line 438, in callproc > > r = self._cs.callproc(procname.upper(), t_args) > > _db2.error: > > > > SQLSTATE : 22007, NATIVE ERROR CODE : -99999 > > > > [IBM][CLI Driver] CLI0113E SQLSTATE 22007: An invalid datetime format > > was detected; that is, an invalid string representation or value was > > specified. SQLSTATE=22007 > > ***** > > > > As you can see, I've tried a couple of alternative date-time formats. > > No luck. I then changed the CREATE PROCEDURE statement to specify a > > VARCHAR(16) INOUT parameter to simplify the testcase by avoiding any > > datetime weirdness, but ended up getting the same value I had passed > > into the stored procedure, instead of having it set by the stored > > procedure to some other value. Finally, I changed the stored procedure > > signature to a single OUT parameter, but still didn't find that > > .callproc ended up returning any changed input sequence values. When I > > call these stored proecedures from the command line, they perform as I > > expected. > > > > So, does pyDB2 support INOUT or OUT parameters? > > > > Also, I created the rsultset.db2 sample stored procedure shipped in > > the SQLLIB/samples/sqlproc directory, then tried calling it from > > Python. I was able to retrieve the first result set from the stored > > procedure, but when I called curs.nextset() I received an error: > > AttributeError: Cursor instance has no attribute 'nextset' > > > > So it looks like pyDB2 doesn't support stored procedures that return > > multiple result sets through the Cursor.nextset() method -- is this > > correct? > > > > Thanks, > > Dan > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://productguide.itmanagersjournal.com/ > > _______________________________________________ > > PyDB2-discuss mailing list > > PyD...@li... > > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > > |
From: Yuval T. <yu...@ad...> - 2004-12-06 06:16:25
|
On Monday 06 December 2004 07:35, ??? wrote: > You know we can get lots of hints from other Python database modules like > MySQLdb and DCOracle*. After reviewing them, I can start coding afresh, I > think. I've been meaning to say this for a long time now... :-) Well, I actually started to implement a MySQLdb-like module - which basically means, implement only the basics in C and the rest in python (I think it comes out to be implementing the connection object in C and the cursors in python - similar to MySQLdb). I stopped working on it a while ago - I've been meaning to post the idea before I get serious with it. I'm pretty familiar with DB2 (not a lot, but enough) and with the current DB2 module. So maybe now's a good time to get back on it - I'm in. Anybody else ? :-) -- Yuval Turgeman Content Technology, Aduva LTD. |
From: ??? <yo...@li...> - 2004-12-06 05:36:18
|
SGl+DQoNCkN1cnJlbnRseSwgc3RvcmVkIHByb2NlZH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XMgdGhhdCBy ZXR1cm4NCj4gbXVsdGlwbGUgcmVzdWx0IHNldHMgdGhyb3VnaCB0aGUgQ3Vyc29yLm5leHRzZXQo KSBtZXRob2QgLS0gaXMgdGhpcw0KPiBjb3JyZWN0Pw0KPiANCj4gVGhhbmtzLA0KPiBEYW4NCj4g DQo+IA0KPiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tDQo+IFNGIGVtYWlsIGlzIHNwb25zb3JlZCBieSAtIFRoZSBJVCBQcm9kdWN0IEd1aWRl DQo+IFJlYWQgaG9uZXN0ICYgY2FuZGlkIHJldmlld3Mgb24gaHVuZHJlZHMgb2YgSVQgUHJvZHVj dHMgZnJvbSByZWFsIHVzZXJzLg0KPiBEaXNjb3ZlciB3aGljaCBwcm9kdWN0cyB0cnVseSBsaXZl IHVwIHRvIHRoZSBoeXBlLiBTdGFydCByZWFkaW5nIG5vdy4gDQo+IGh0dHA6Ly9wcm9kdWN0Z3Vp ZGUuaXRtYW5hZ2Vyc2pvdXJuYWwuY29tLw0KPiBfX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fXw0KPiBQeURCMi1kaXNjdXNzIG1haWxpbmcgbGlzdA0KPiBQeURC Mi1kaXNjdXNzQGxpc3RzLnNvdXJjZWZvcmdlLm5ldA0KPiBodHRwczovL2xpc3RzLnNvdXJjZWZv cmdlLm5ldC9saXN0cy9saXN0aW5mby9weWRiMi1kaXNjdXNzDQo+ |
From: Dan S. <de...@gm...> - 2004-12-05 04:58:43
|
Hi: I noticed there is no documentation in the README about stored procedure support, so I went ahead to try it out according to the interface defined by PEP249. Env: DB2 V8.2, Windows XP, Python 2.3, pyDB2 0.998a installed from Man-Yong Lee's binary. I started by creating a simple SQL stored procedure to test the INOUT parameter support: CREATE PROCEDURE test_date(INOUT date DATE) BEGIN SET date = '2007-01-05'; END ... then called it from the following method: def call_procedure_inout(conn): """ Call a procedure that accepts one INOUT DATE parameter. """ curs=conn.cursor() stmt = 'TEST_DATE' parm = ('2004-12-02') # parm = ('10/27/1991') res = curs.callproc(stmt, parm) return res The expected return value would be '2007-01-05', but I get an error instead: ***** File "C:\local\python2.3\Lib\site-packages\DB2.py", line 438, in callproc r = self._cs.callproc(procname.upper(), t_args) _db2.error: SQLSTATE : 22007, NATIVE ERROR CODE : -99999 [IBM][CLI Driver] CLI0113E SQLSTATE 22007: An invalid datetime format was detected; that is, an invalid string representation or value was specified. SQLSTATE=22007 ***** As you can see, I've tried a couple of alternative date-time formats. No luck. I then changed the CREATE PROCEDURE statement to specify a VARCHAR(16) INOUT parameter to simplify the testcase by avoiding any datetime weirdness, but ended up getting the same value I had passed into the stored procedure, instead of having it set by the stored procedure to some other value. Finally, I changed the stored procedure signature to a single OUT parameter, but still didn't find that .callproc ended up returning any changed input sequence values. When I call these stored proecedures from the command line, they perform as I expected. So, does pyDB2 support INOUT or OUT parameters? Also, I created the rsultset.db2 sample stored procedure shipped in the SQLLIB/samples/sqlproc directory, then tried calling it from Python. I was able to retrieve the first result set from the stored procedure, but when I called curs.nextset() I received an error: AttributeError: Cursor instance has no attribute 'nextset' So it looks like pyDB2 doesn't support stored procedures that return multiple result sets through the Cursor.nextset() method -- is this correct? Thanks, Dan |
From: <po...@or...> - 2004-12-04 23:56:32
|
Dan Scott <de...@gm...> writes: > Hello: > > I took the liberty of adding pyDB2 to the Python Package Index (PyPi) > (http://www.python.org/pypi?:action=display&name=pyDB2&version=0.996a) > to help other people find out about this great module. Thank you very much, Dan. Much appreciated. -- Patrick K. O'Brien Orbtech http://www.orbtech.com Pypersyst http://www.pypersyst.org Schevo http://www.schevo.org |
From: Dan S. <de...@gm...> - 2004-12-04 21:48:39
|
Hello: I took the liberty of adding pyDB2 to the Python Package Index (PyPi) (http://www.python.org/pypi?:action=display&name=pyDB2&version=0.996a) to help other people find out about this great module. I inserted Man-Yong Lee's name as the author of the module, and put Patrick's name as the maintainer (since the Sourceforge project is under his name). If either of you want to be able to edit the PyPi record for pyDB2, just tell me what your Python.org username is and I'll happily assign admin privileges to you. From what I understand, the new "python setup.py register" command should automatically update this information in PyPi if you've set things up appropriately (http://www.python.org/~jeremy/weblog/030924.html). Dan |