From fog@mixadlive.com Sat Sep 1 23:31:22 2001 From: fog@mixadlive.com (Federico Di Gregorio) Date: Sun, 2 Sep 2001 00:31:22 +0200 Subject: [DB-SIG] Re: psycopg 0.96b1 In-Reply-To: <20010830120941.B949@arioch.nekhem.fr> References: <20010830120941.B949@arioch.nekhem.fr> Message-ID: <20010902003122.G11707@developers.mixadlive.com> Scavenging the mail folder uncovered Eric Bianchi's letter: > Concerning the binary objects support in Postgresql 7.1, It seems to me that bytea is a long text type and can't be considered as a binary object. Binary objects are handled by low level functions like lo_create, lo_open, ... and their type is oid. eric, you're confusing a *large* object with a binary (i.e. null-safe) object. > According to Postgresql's documentation, bytea type must be considered as a text type. bytea is a null-safe byte array. that is, a 'binary object'. have fun, federico From kimtitu@yahoo.com Thu Sep 6 22:55:15 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Thu, 6 Sep 2001 14:55:15 -0700 (PDT) Subject: [DB-SIG] Need help with DCO2 Message-ID: <20010906215515.30341.qmail@web14708.mail.yahoo.com> Hi there, I am a newbie in db programming with python. I just have my RH7.1 setup and all the configuration are default. I believe i have python 1.5. I download DCO2-linux-Beta3.tar.gz module from http://www.zope.org/Members/matt/dco2 website. I want to try to write simple program to query Oracle 8i server from my local machine. I follow the instruction in README inside DCO2 which is produced by unpacking the gz package. when i type make, I get message that 'make: nothing to be done for all' . I unpack .gz file under my /home/user directory. I am stuck. How can i proceed from here? I appreciate for any possible help. Kimtitu __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com From sarcangeli@montrouge.sema.slb.com Fri Sep 7 10:19:57 2001 From: sarcangeli@montrouge.sema.slb.com (Silvio Arcangeli) Date: Fri, 07 Sep 2001 10:19:57 +0100 Subject: [DB-SIG] ODBC and mxODBC Message-ID: <4.3.2.7.2.20010907101324.00af7e30@popper.montrouge.tt.slb.com> Hello everybody, I'm using database connectivity in Python from a few days, and I'm quite amused! My team is using Python and Jython to test the API (both the Java one and the C One) of a CORBA platform. (we run the same scripts on both the platforms, it's amazing!). I would like to add the possibility to access the database (an Oracle 7 database) from both C and Java. In Jython I'm using the zxJDBC package and it seems to work fine, and I saw that it provides a wrapper module that works over zxJDBC and mxODBC, so that we can use again the same scripts both in Jython and CPython. But I also realized that there's another ODBC module for Python that it's completely free. What are the differences between ODBC and mxODBC modules? Will it be easy to adapt the wrapper module to handle ODBC as well? Should I tell my boss to buy the licenses for mxODBC? thanks for your help, bye! Silvio. From paul@boddie.net Fri Sep 7 10:50:32 2001 From: paul@boddie.net (paul@boddie.net) Date: 7 Sep 2001 09:50:32 -0000 Subject: [DB-SIG] Re: ODBC and mxODBC Message-ID: <20010907095032.24699.qmail@www2.nameplanet.com> Silvio Arcangeli wrote: > > What are the differences between ODBC and mxODBC modules? > Will it be easy to adapt the wrapper module to handle ODBC as well? > Should I tell my boss to buy the licenses for mxODBC? I think the major difference between the two is that the ODBC module is only available on Windows and isn't supported or developed by anyone, at least as far as I can tell. In contrast, mxODBC is supported and actively developed; moreover, it appears to be much more comprehensive. If I were using ODBC seriously, I'd probably want to use mxODBC in preference to the ODBC module; I would feel much more comfortable doing so. Paul -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From matt@zope.com Fri Sep 7 13:15:59 2001 From: matt@zope.com (Matthew T. Kromer) Date: Fri, 7 Sep 2001 08:15:59 -0400 Subject: [DB-SIG] Need help with DCO2 References: <20010906215515.30341.qmail@web14708.mail.yahoo.com> Message-ID: <000d01c13796$dadb1ee0$0501010a@mi.org> Why don't you try the Beta 5 version instead, which features more pre-built binaries packed in the same package. I suspect that you do not have the Oracle client libraries installed on your computer -- if you do not have them, then you will need to get them from http://technet.oracle.com/ and install the client libraries and or the client developer package. ----- Original Message ----- From: "Titu Kim" To: Sent: Thursday, September 06, 2001 5:55 PM Subject: [DB-SIG] Need help with DCO2 > Hi there, > I am a newbie in db programming with python. I just > have my RH7.1 setup and all the configuration are > default. I believe i have python 1.5. I download > DCO2-linux-Beta3.tar.gz module from > http://www.zope.org/Members/matt/dco2 website. I want > to try to write simple program to query Oracle 8i > server from my local machine. I follow the instruction > in README inside DCO2 which is produced by unpacking > the gz package. when i type make, I get message that > 'make: nothing to be done for all' . I unpack .gz file > under my /home/user directory. I am stuck. How can i > proceed from here? I appreciate for any possible help. > > Kimtitu > > __________________________________________________ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger > http://im.yahoo.com > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > http://mail.python.org/mailman/listinfo/db-sig > From andy@dustman.net Fri Sep 7 16:26:26 2001 From: andy@dustman.net (Andy Dustman) Date: 07 Sep 2001 11:26:26 -0400 Subject: [DB-SIG] MySQLdb-0.9.1 release candidate 1 Message-ID: <999876386.16799.10.camel@chef.comstar.net> If you're a MySQLdb user, try 0.9.1c1. This will become 0.9.1 final barring any bug reports. Reported bugs will be fixed in 0.9.1. Unreported bugs won't be. -- Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy I'll give spammers one bite of the apple, but they'll have to guess which bite has the razor blade in it. From zdson@263.net Wed Sep 12 12:37:53 2001 From: zdson@263.net (pfty) Date: Wed, 12 Sep 2001 19:37:53 +0800 Subject: [DB-SIG] (no subject) Message-ID: <004501c13b7f$5ec13410$0401a8c0@pfty> This is a multi-part message in MIME format. ------=_NextPart_000_0040_01C13BC2.6A6431D0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 DQo= ------=_NextPart_000_0040_01C13BC2.6A6431D0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PWdi MjMxMiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNS4w MC4yOTIwLjAiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8Qk9E WSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPiZuYnNwOzwvRElWPjwvQk9EWT48L0hUTUw+DQo= ------=_NextPart_000_0040_01C13BC2.6A6431D0-- From zdson@263.net Wed Sep 12 13:31:14 2001 From: zdson@263.net (pfty) Date: Wed, 12 Sep 2001 20:31:14 +0800 Subject: [DB-SIG] (no subject) Message-ID: <002d01c13b86$d1ae1db0$0401a8c0@pfty> This is a multi-part message in MIME format. ------=_NextPart_000_002A_01C13BC9.DDF94250 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 aGkhDQpJIGFtIGEgem9wZSB1c2VyICxub3cgSSBtZWV0IGEgcHJvYmxlbS4NCkkgaGF2ZSB0byBj b25uZWN0IGRhdGFiYXNlIHN1Y2ggYXMgU3FsIFNlcnZlciChom9yYWNsZaGiZm94cHJvoaJhY2Nl c3Mgb24gdW5peC9saW51eC4NCkhvdyBjYW4gSSBkbyBpdD8NCmhlbHAgbWUhIQ0KDQo= ------=_NextPart_000_002A_01C13BC9.DDF94250 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PWdi MjMxMiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNS4w MC4yOTIwLjAiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8Qk9E WSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPjxGT05UIHNpemU9Mj5oaSE8L0ZPTlQ+PC9ESVY+DQo8 RElWPjxGT05UIHNpemU9Mj5JIGFtIGEgem9wZSB1c2VyICxub3cgSSBtZWV0IGEgcHJvYmxlbS48 L0ZPTlQ+PC9ESVY+DQo8RElWPjxGT05UIHNpemU9Mj5JIGhhdmUgdG8gY29ubmVjdCBkYXRhYmFz ZSZuYnNwO3N1Y2ggYXMgU3FsIFNlcnZlciANCqGib3JhY2xloaJmb3hwcm+homFjY2VzcyBvbiB1 bml4L2xpbnV4LjwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPkhvdyBjYW4gSSBkbyBp dD88L0ZPTlQ+PC9ESVY+DQo8RElWPjxGT05UIHNpemU9Mj5oZWxwIG1lISE8L0ZPTlQ+PC9ESVY+ DQo8RElWPiZuYnNwOzwvRElWPjwvQk9EWT48L0hUTUw+DQo= ------=_NextPart_000_002A_01C13BC9.DDF94250-- From zdson@263.net Wed Sep 12 13:41:54 2001 From: zdson@263.net (pfty) Date: Wed, 12 Sep 2001 20:41:54 +0800 Subject: [DB-SIG] (no subject) Message-ID: <004801c13b88$4db31ea0$0401a8c0@pfty> This is a multi-part message in MIME format. ------=_NextPart_000_0045_01C13BCB.5B918D70 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 SSBhbSBhIHpvcGUgdXNlciANCkkgaGF2ZSB0byBjb25uZWN0IHRvIGRhdGFiYXNlIHN1Y2ggYXMg TVMgU3FsIFNlcnZlcixBY2Nlc3MsZm94cHJvLG9yYWNsZSBldGMgb24gdW5peC9saW51eCBwbGF0 Zm9ybS4NCkhvdyBjYW4gSSBkbyBpdD8/aGVscCBtZSCjoQ0K ------=_NextPart_000_0045_01C13BCB.5B918D70 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PWdi MjMxMiIgaHR0cC1lcXVpdj1Db250ZW50LVR5cGU+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNS4w MC4yOTIwLjAiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8Qk9E WSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPjxGT05UIHNpemU9Mj5JIGFtIGEgem9wZSB1c2VyIDwv Rk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPkkgaGF2ZSB0byBjb25uZWN0IHRvIGRhdGFi YXNlIHN1Y2ggYXMgTVMgU3FsIA0KU2VydmVyLEFjY2Vzcyxmb3hwcm8sb3JhY2xlIGV0YyBvbiB1 bml4L2xpbnV4IHBsYXRmb3JtLjwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgc2l6ZT0yPkhvdyBj YW4gSSBkbyBpdD8/aGVscCBtZSCjoTwvRk9OVD48L0RJVj48L0JPRFk+PC9IVE1MPg0K ------=_NextPart_000_0045_01C13BCB.5B918D70-- From daniel.dittmar@sap.com Wed Sep 12 13:46:51 2001 From: daniel.dittmar@sap.com (Dittmar, Daniel) Date: Wed, 12 Sep 2001 14:46:51 +0200 Subject: [DB-SIG] Zope DB Connectivity (was: (no subject)) Message-ID: > I am a zope user ,now I meet a problem. > I have to connect database such as Sql Server = =A1=A2oracle=A1=A2foxpro=A1=A2access on unix/linux. > How can I do it? > help me!! 1. read the appropriate chapter in the Zope Book: http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml 2. scan the Zope product list for a database adapter (depending on the database you're using) > I am a zope user=20 > I have to connect to database such as MS Sql = Server,Access,foxpro,oracle etc on unix/linux platform. > How can I do it??help me =A3=A1 1. read the appropriate chapter in the Zope Book: http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml 2. scan the Zope product list for a database adapter (depending on the database you're using) Daniel -- Daniel Dittmar daniel.dittmar@sap.com SAP DB, SAP Labs Berlin http://www.sapdb.org/ From andy@dustman.net Wed Sep 12 13:58:06 2001 From: andy@dustman.net (Andy Dustman) Date: 12 Sep 2001 08:58:06 -0400 Subject: [DB-SIG] (no subject) In-Reply-To: <004801c13b88$4db31ea0$0401a8c0@pfty> References: <004801c13b88$4db31ea0$0401a8c0@pfty> Message-ID: <1000299486.7705.6.camel@chef.comstar.net> On Wed, 2001-09-12 at 08:41, pfty wrote: > I am a zope user=20 > I have to connect to database such as MS Sql Server,Access,foxpro,oracle = etc on unix/linux platform. > How can I do it??help me =EF=BC=81 You are better off asking this on the Zope list (zope@zope.org). Generally, you need a Zope Database Adapater (DA), and these are available at http://www.zope.org/Products/external_access --=20 Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy I'll give spammers one bite of the apple, but they'll have to guess which bite has the razor blade in it. From mal@lemburg.com Wed Sep 12 17:36:40 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Wed, 12 Sep 2001 18:36:40 +0200 Subject: [DB-SIG] ODBC and mxODBC References: <4.3.2.7.2.20010907101324.00af7e30@popper.montrouge.tt.slb.com> Message-ID: <3B9F8F18.BA3AFCBB@lemburg.com> Silvio Arcangeli wrote: > > Hello everybody, > I'm using database connectivity in Python from a few days, and I'm quite > amused! > My team is using Python and Jython to test the API (both the Java one and > the C One) of a CORBA platform. (we run the same scripts on both the > platforms, it's amazing!). That's the idea :-) > I would like to add the possibility to access the database (an Oracle 7 > database) from both C and Java. In Jython I'm using the zxJDBC package and > it seems to work fine, and I saw that it provides a wrapper module that > works over zxJDBC and mxODBC, so that we can use again the same scripts > both in Jython and CPython. zxJDBC was written with mxODBC's DB API extensions in mind, so you shouldn't really need a wrapper to run the same script on both platforms. The only thing needed would be a different import statement and maybe some glue to deal with date/time values (on Java these come out as Java date/time objects, I believe, whereas on C DateTime objects from mxDateTime are used). > But I also realized that there's another ODBC module for Python that it's > completely free. > What are the differences between ODBC and mxODBC modules? The odbc module is old, does not implement DB API 2.0 and has no active maintainer (managing ODBC is tough, I can tell you !). Still, it does provide basic ODBC access capabilities which may be fit for your needs; depends on what you want to achieve... > Will it be easy to adapt the wrapper module to handle ODBC as well? > Should I tell my boss to buy the licenses for mxODBC? I'm biased, so won't comment on this one ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From TKeating@origin.ea.com Wed Sep 12 18:07:53 2001 From: TKeating@origin.ea.com (Keating, Tim) Date: Wed, 12 Sep 2001 12:07:53 -0500 Subject: [DB-SIG] ODBC and mxODBC Message-ID: <2292DBED5A978A498EABCCE95524499E0281D61A@osi-postal.osi.ad.ea.com> > > Will it be easy to adapt the wrapper module to handle ODBC as well? > > Should I tell my boss to buy the licenses for mxODBC? > > I'm biased, so won't comment on this one ;-) OK, then I will. When this module went from being free to commercially licensed, at first I was pissed. Then I looked at the licensing terms, and relative to the cost of other database libraries and tools (not to mention the platforms themselves -- for example, $40K USD _per CPU_ for Oracle Enterprise!!!), the cost of licensing mxODBC is a drop in the bucket. It's a high-quality module, actively maintained and support is readily available for a reasonable fee. Buy the license. It's well worth the $75 USD per CPU. TK From Benjamin.Schollnick@usa.xerox.com Wed Sep 12 18:28:57 2001 From: Benjamin.Schollnick@usa.xerox.com (Schollnick, Benjamin) Date: Wed, 12 Sep 2001 13:28:57 -0400 Subject: [DB-SIG] ODBC and mxODBC Message-ID: Tim, I agree.... (Except I wasn't pissed when it first switched...) My only disagreement with MxODBC is that I can't use it. 1) I am mainly programming in python in my work setting, unofficially, my boss accepts it only because it *works*. Even then, he keeps gripping that I should be writing them in VB. 2) Since almost all of the Database programming I've done at work, I'm not willing to pay for a MxODBC license out of my pocket. Especially since the python programs that I write, using DB's are small web page indices (Less than 100 lines of code). 3) Where I work there's a spending freeze... And I *know* even if there wasn't that my boss would *NOT* be willing to purchase the license, he'd force me to use VB. So to preserve my sanity, and to resist the M$ invasion, I can't use MxODBC. I honestly haven't run into any features that I need, that aren't available from the Win32 ODBC library, so I am not sure what I'm missing. I use to do shareware, and I certainly agree that the licensing terms are *excellent*. If I start doing Database programming @ home, I certainly would examine MxODBC again, and see if I need the additional features... - Benjamin -----Original Message----- From: Keating, Tim [mailto:TKeating@origin.ea.com] Sent: Wednesday, September 12, 2001 1:08 PM To: db-sig@python.org Subject: RE: [DB-SIG] ODBC and mxODBC > > Will it be easy to adapt the wrapper module to handle ODBC as well? > > Should I tell my boss to buy the licenses for mxODBC? > > I'm biased, so won't comment on this one ;-) OK, then I will. When this module went from being free to commercially licensed, at first I was pissed. Then I looked at the licensing terms, and relative to the cost of other database libraries and tools (not to mention the platforms themselves -- for example, $40K USD _per CPU_ for Oracle Enterprise!!!), the cost of licensing mxODBC is a drop in the bucket. It's a high-quality module, actively maintained and support is readily available for a reasonable fee. Buy the license. It's well worth the $75 USD per CPU. TK _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig From TKeating@origin.ea.com Wed Sep 12 18:41:59 2001 From: TKeating@origin.ea.com (Keating, Tim) Date: Wed, 12 Sep 2001 12:41:59 -0500 Subject: [DB-SIG] ODBC and mxODBC Message-ID: <2292DBED5A978A498EABCCE95524499E0281D61C@osi-postal.osi.ad.ea.com> You might look at wrapping ADO, then. Using win32com I was able to do this in about a day (the wrapper doesn't support any version of the DB API, though). I've used my ADO wrapper at work with SQL server and at home with Access, without significant issues. (With far fewer issues, in fact, than when using ADO from ASP :) TK > -----Original Message----- > From: Schollnick, Benjamin [mailto:Benjamin.Schollnick@usa.xerox.com] > Sent: Wednesday, September 12, 2001 12:29 PM > To: db-sig@python.org > Subject: RE: [DB-SIG] ODBC and mxODBC > Importance: Low > > I agree.... (Except I wasn't pissed when it first switched...) > > My only disagreement with MxODBC is that I can't use it. From bkline@rksystems.com Wed Sep 12 18:45:09 2001 From: bkline@rksystems.com (Bob Kline) Date: Wed, 12 Sep 2001 13:45:09 -0400 (EDT) Subject: [DB-SIG] ODBC and mxODBC In-Reply-To: <2292DBED5A978A498EABCCE95524499E0281D61A@osi-postal.osi.ad.ea.com> Message-ID: On Wed, 12 Sep 2001, Keating, Tim wrote: > > > Will it be easy to adapt the wrapper module to handle ODBC as well? > > > Should I tell my boss to buy the licenses for mxODBC? > > > > I'm biased, so won't comment on this one ;-) > > OK, then I will. When this module went from being free to > commercially licensed, at first I was pissed. Then I looked at the > licensing terms, and relative to the cost of other database > libraries and tools (not to mention the platforms themselves -- for > example, $40K USD _per CPU_ for Oracle Enterprise!!!), the cost of > licensing mxODBC is a drop in the bucket. It's a high-quality > module, actively maintained and support is readily available for a > reasonable fee. > > Buy the license. It's well worth the $75 USD per CPU. But first make sure it has the features you need. The callproc() method wasn't implemented last time I looked, so you won't be able to work with output parameters. Nor was the nextset() method, as I recall. -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From kimtitu@yahoo.com Wed Sep 12 21:03:32 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Wed, 12 Sep 2001 13:03:32 -0700 (PDT) Subject: [DB-SIG] Which Oracle client libraries should i use? Message-ID: <20010912200332.81532.qmail@web14704.mail.yahoo.com> Hi, all, I have been looking for the client library at technet site. There are so many packages listed. I don't know which one i need to download and install on my client machine so that i can write a client program in python to access Oracle 8i database server. If you know, please kindly let me know the name of the file or packages. Thanks a lot. Kim Titu __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com From TKeating@origin.ea.com Wed Sep 12 22:20:03 2001 From: TKeating@origin.ea.com (Keating, Tim) Date: Wed, 12 Sep 2001 16:20:03 -0500 Subject: [DB-SIG] Which Oracle client libraries should i use? Message-ID: <2292DBED5A978A498EABCCE95524499E0281D622@osi-postal.osi.ad.ea.com> Try this: http://technet.oracle.com/software/products/oracle8i/content.html It will probably prompt you for your OTN password. Choose your platform. Agree not to export the software. Then you will get the downloads page. The last item on the page is the Oracle client download. You probably missed it (as did I, originally) because it looks like it's under "Standard Edition" and you were looking for Enterprise. TK > -----Original Message----- > From: Titu Kim [mailto:kimtitu@yahoo.com] > Sent: Wednesday, September 12, 2001 3:04 PM > To: db-sig@python.org > Subject: [DB-SIG] Which Oracle client libraries should i use? > > > Hi, all, > I have been looking for the client library at > technet site. There are so many packages listed. I > don't know which one i need to download and install on > my client machine so that i can write a client program > in python to access Oracle 8i database server. If you > know, please kindly let me know the name of the file > or packages. Thanks a lot. > > Kim Titu > > __________________________________________________ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with > Yahoo! Messenger > http://im.yahoo.com > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > http://mail.python.org/mailman/listinfo/db-sig > From sarcangeli@montrouge.sema.slb.com Thu Sep 13 13:01:26 2001 From: sarcangeli@montrouge.sema.slb.com (Silvio Arcangeli) Date: Thu, 13 Sep 2001 13:01:26 +0100 Subject: [DB-SIG] ODBC and mxODBC In-Reply-To: <3B9F8F18.BA3AFCBB@lemburg.com> References: <4.3.2.7.2.20010907101324.00af7e30@popper.montrouge.tt.slb.com> Message-ID: <4.3.2.7.2.20010913114629.00ae9770@popper.montrouge.tt.slb.com> zxJDBC provides a wrapper that takes connection parameters from an ini file, so you don't even have to mind about the underlying platform, or about the DB-API module that is actually imported. I know, I'm very lazy:) I told my boss about the license and she told me that 75$ is very cheap, so it's not a problem. (Here Python has a greater consideration than Visual Basic, yesterday I made a small presentation about it and they were amazed). As to the functions that are missing in mxODBC, I didn't use it so deeply... I didn't notice that you can't call stored procedures! For our test I don't think we need it, anyway they'd better implement it it!! Silvio. At 06:36 PM 9/12/01 +0200, you wrote: >zxJDBC was written with mxODBC's DB API extensions in mind, so you shouldn't >really need a wrapper to run the same script on both platforms. The only >thing needed would be a different import statement and maybe some >glue to deal with date/time values (on Java these come out as Java date/time >objects, I believe, whereas on C DateTime objects from mxDateTime are >used). From bkline@rksystems.com Thu Sep 13 12:20:12 2001 From: bkline@rksystems.com (Bob Kline) Date: Thu, 13 Sep 2001 07:20:12 -0400 (EDT) Subject: [DB-SIG] ODBC and mxODBC In-Reply-To: <4.3.2.7.2.20010913114629.00ae9770@popper.montrouge.tt.slb.com> Message-ID: On Thu, 13 Sep 2001, Silvio Arcangeli wrote: > I didn't notice that you can't call stored procedures! I didn't say you can't call stored procedures at all (you can do this with the execute() method). You just can't do all the things with stored procedures that you can with a full implementation of the API (specifically, you can't get to the values of output parameters). -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From mal@lemburg.com Thu Sep 13 16:06:29 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu, 13 Sep 2001 17:06:29 +0200 Subject: [DB-SIG] ODBC and mxODBC References: Message-ID: <3BA0CB75.C96BDAC3@lemburg.com> Bob Kline wrote: > > On Thu, 13 Sep 2001, Silvio Arcangeli wrote: > > > I didn't notice that you can't call stored procedures! > > I didn't say you can't call stored procedures at all (you can do this > with the execute() method). You just can't do all the things with > stored procedures that you can with a full implementation of the API > (specifically, you can't get to the values of output parameters). True for 2.0.x. The 2.1 version will implement .callproc() as well as .nextset(). But the .callproc() method won't support output parameters either. I've found that these can easily be emulated using result sets which give you much more flexibility in terms of handling different data types, so I decided not to implement output and input/output parameters. That said, I believe that we shouldn't have allowed .callproc() to handle anything other than input parameters in the first place. It just complicates the implementation and doesn't gain you any flexibility. I'm also thinking of adding support for input data type converters in 2.1. 2.0 only support output data type converters. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From bkline@rksystems.com Thu Sep 13 16:38:55 2001 From: bkline@rksystems.com (Bob Kline) Date: Thu, 13 Sep 2001 11:38:55 -0400 (EDT) Subject: [DB-SIG] ODBC and mxODBC In-Reply-To: <3BA0CB75.C96BDAC3@lemburg.com> Message-ID: On Thu, 13 Sep 2001, M.-A. Lemburg wrote: > That said, I believe that we shouldn't have allowed .callproc() to > handle anything other than input parameters in the first place. It > just complicates the implementation and doesn't gain you any > flexibility. Well, that would have eliminated the ability to use the API on several very large projects I've worked on (Oracle and SQL Server) each of which used dozens of stored procedure with output parameters. -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From paul@boddie.net Thu Sep 13 18:04:37 2001 From: paul@boddie.net (paul@boddie.net) Date: 13 Sep 2001 17:04:37 -0000 Subject: [DB-SIG] mxODBC and Stored Procedures Message-ID: <20010913170437.24473.qmail@www1.nameplanet.com> Marc-André Lemburg wrote: > > The 2.1 version will implement .callproc() as well > as .nextset(). But the .callproc() method won't support output > parameters either. I've found that these can easily be emulated > using result sets which give you much more flexibility in terms > of handling different data types, so I decided not to implement > output and input/output parameters. But surely the usage of stored procedures where the Python developer has no access to the database-resident code necessitates the provision of in/out and out parameters. It's frequently not (just) a question of what is better or more flexible. > That said, I believe that we shouldn't have allowed .callproc() > to handle anything other than input parameters in the first > place. It just complicates the implementation and doesn't gain > you any flexibility. I can see that the in-place modification of sequence elements is "un-Pythonic" for a procedure abstraction, and although there may be interesting ways of modifying tuples at the C API level, it really means that people have to use lists with such calls, if only to avoid conceptual surprises. When I extended oracledb (over three years ago now) to handle stored procedures, I seem to remember the method I implemented requiring a sequence containing a combination of the in and in/out parameters in the order given in the stored procedure's signature, with the result of the operation being a tuple containing the subsequent in/out and out values (again in the order given in the signature). For example: # SOMEPROC(in1, inout1, out1, inout2, in2, in3) (new_in_out1, out1, new_in_out2) = cursor.callproc("SOMEPROC", (in1, in_out1, in_out2, in2, in3)) As a result, in/out and out parameters (and the requirement that they be variables) didn't really exist at the Python level at all. Therefore, sequences of values could be passed into the method and variables could be used to collect the result values, thus providing the illusion of variable modification if really desired (use in_out1 and in_out2 instead of new_in_out1 and new_in_out2 respectively in the above example). This is arguably much more Pythonic and indeed more flexible, if a little hard to follow sometimes - I may have considered adding fillers to the sequences too: (tmp, in_out1, tmp, out1, in_out2, tmp) = cursor.callproc("SOMEPROC", (in1, in_out1, None, in_out2, in2, in3)) Although it can be tempting to use None with the result values, with the usual nasty results... Paul P.S. This issue and some issues around transactions (discussed on the Webware list) could open up a new debate on the DB-API. I know that someone was interested in making DB-API version 3, but at the time no-one had any real issues with version 2. Is the time right to put proposals forward? -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From kimtitu@yahoo.com Thu Sep 13 22:11:03 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Thu, 13 Sep 2001 14:11:03 -0700 (PDT) Subject: [DB-SIG] runInstaller problem with Oracle client installation Message-ID: <20010913211103.83920.qmail@web14706.mail.yahoo.com> Hi, I downloaded the whole tar ball of oracle for linux. After logging in as oracle, i execute 'runInstaller' under install directory. Then i get a message saying something similar to "Initializing Java Virtual Machine from ../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/bin/jre Please wait..." After this message, i wait forever and i cannot get the prompt back with Return key. Can somebody help me with this problem? Thanks a lot. Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From mal@lemburg.com Thu Sep 13 19:42:33 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu, 13 Sep 2001 20:42:33 +0200 Subject: [DB-SIG] mxODBC and Stored Procedures References: <20010913170437.24473.qmail@www1.nameplanet.com> Message-ID: <3BA0FE19.CDEB7BB@lemburg.com> paul@boddie.net wrote: >=20 > Marc-Andr=E9 Lemburg wrote: > > > > The 2.1 version will implement .callproc() as well > > as .nextset(). But the .callproc() method won't support output > > parameters either. I've found that these can easily be emulated > > using result sets which give you much more flexibility in terms > > of handling different data types, so I decided not to implement > > output and input/output parameters. >=20 > But surely the usage of stored procedures where the Python developer ha= s no > access to the database-resident code necessitates the provision of in/o= ut and > out parameters. It's frequently not (just) a question of what is better= or more > flexible. Ok, ok. You've got me convinced. I'll look into providing support for in/out and output parameters too. =20 > > That said, I believe that we shouldn't have allowed .callproc() > > to handle anything other than input parameters in the first > > place. It just complicates the implementation and doesn't gain > > you any flexibility. >=20 > I can see that the in-place modification of sequence elements is "un-Py= thonic" > for a procedure abstraction, and although there may be interesting ways= of > modifying tuples at the C API level, it really means that people have t= o use > lists with such calls, if only to avoid conceptual surprises. >=20 > When I extended oracledb (over three years ago now) to handle stored > procedures, I seem to remember the method I implemented requiring a seq= uence > containing a combination of the in and in/out parameters in the order g= iven in > the stored procedure's signature, with the result of the operation bein= g a > tuple containing the subsequent in/out and out values (again in the ord= er given > in the signature). For example: >=20 > # SOMEPROC(in1, inout1, out1, inout2, in2, in3) > (new_in_out1, out1, new_in_out2) =3D cursor.callproc("SOMEPROC", > (in1, in_out1, in_out2, in2, in3)) >=20 > As a result, in/out and out parameters (and the requirement that they b= e > variables) didn't really exist at the Python level at all. Therefore, s= equences > of values could be passed into the method and variables could be used t= o > collect the result values, thus providing the illusion of variable modi= fication > if really desired (use in_out1 and in_out2 instead of new_in_out1 and > new_in_out2 respectively in the above example). This is arguably much m= ore > Pythonic and indeed more flexible, if a little hard to follow sometimes= - I may > have considered adding fillers to the sequences too: >=20 > (tmp, in_out1, tmp, out1, in_out2, tmp) =3D cursor.callproc("SOMEPROC= ", > (in1, in_out1, None, in_out2, in2, in3)) This is what DB API 2.0 specifies if I'm not mistaken.=20 =20 > Although it can be tempting to use None with the result values, with th= e usual > nasty results... Aside: I think that we (pydev) decided to use _ as replacement for unneed= ed=20 parameters... at least that's what Martin von Loewis uses a lot and it seems to work quite nicely. =20 > Paul >=20 > P.S. This issue and some issues around transactions (discussed on the W= ebware > list) could open up a new debate on the DB-API. I know that someone was > interested in making DB-API version 3, but at the time no-one had any r= eal > issues with version 2. Is the time right to put proposals forward? The 3.0 proposal was really more about a proposal for a DBI wrapper around DB API compliant modules. In that sense it did not really target the DB API itself. Which are the issues with DB API 2.0 ? The only one which comes to my mind is that it would be nice to expose the exception objects used by the module on the=20 connection objects as read-only attributes: it makes writing generic DB code a lot easier. But this is really only a minor issue, something for say DB API 2.1. Thanks, --=20 Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From paul@boddie.net Fri Sep 14 10:08:45 2001 From: paul@boddie.net (paul@boddie.net) Date: 14 Sep 2001 09:08:45 -0000 Subject: [DB-SIG] mxODBC and Stored Procedures Message-ID: <20010914090845.23385.qmail@www3.nameplanet.com> On Thu, 13 Sep 2001 20:42:33 +0200 "M.-A. Lemburg" wrote: > [Stored procedures written by other people] >Ok, ok. You've got me convinced. I'll look into providing support >for in/out and output parameters too. Hooray! Paul wrote: >> >> (tmp, in_out1, tmp, out1, in_out2, tmp) = cursor.callproc("SOMEPROC", >> (in1, in_out1, None, in_out2, in2, in3)) > >This is what DB API 2.0 specifies if I'm not mistaken. Sorry! I didn't read it closely enough yesterday. Some might find the above notation bizarre, but I think that it's the only way to provide the flexibility which would then allow different calling styles to be implemented on top. For example, one might want a Parameters object to be passed in and manipulated by the stored procedure - this could easily be implemented as a wrapper around the above, but the above couldn't be implemented around such an object, I don't think. >Aside: I think that we (pydev) decided to use _ as replacement for unneeded >parameters... at least that's what Martin von Loewis uses a lot >and it seems to work quite nicely. I thought there was an idiom for this. That sounds like what I've heard before. [DB-API improvements] >The 3.0 proposal was really more about a proposal for a DBI wrapper >around DB API compliant modules. In that sense it did not really >target the DB API itself. I think it mutated into that because we didn't think that there were enough issues with the existing API. I remember things like parameter syntax and other minor things being issues to address with that proposal. >Which are the issues with DB API 2.0 ? > >The only one which comes to my mind is that it would be nice >to expose the exception objects used by the module on the >connection objects as read-only attributes: it makes writing >generic DB code a lot easier. But this is really only a minor issue, >something for say DB API 2.1. Yes, the issue of exception names came up recently on comp.lang.python. On the Webware list, a number of people were interested in defining the transaction semantics more explicitly; whilst it might be obvious to some people that transactions are automatically begun when connections are opened (with most systems) even when only SELECT operations are being performed, this fact is easily forgotten - in fact, I had forgotten it myself when the topic was raised, but it made perfect sense. In addition to this principly documentation-oriented issue, some people were wondering whether explicit transaction demarcation would be possible in the DB- API. I'm not intimate with the problems that they are trying to solve, but one area of interest was database connection pooling. Paul -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From bkline@rksystems.com Fri Sep 14 13:10:24 2001 From: bkline@rksystems.com (Bob Kline) Date: Fri, 14 Sep 2001 08:10:24 -0400 (EDT) Subject: [DB-SIG] mxODBC and Stored Procedures In-Reply-To: <3BA0FE19.CDEB7BB@lemburg.com> Message-ID: On Thu, 13 Sep 2001, M.-A. Lemburg wrote: > The 3.0 proposal was really more about a proposal for a DBI wrapper > around DB API compliant modules. In that sense it did not really > target the DB API itself. > > Which are the issues with DB API 2.0 ? Well, there's one issue surrounding the specification of the executemany() method, which requires the implementor to cache an unbounded amount of result-set data (breaking the client-server paradigm) or to discard that data. I submitted a patch for the spec, and received a reply that it had been applied, but apparently not, as the SIG's web site[1] still has the old language. It would also be nice if the API exposed the ability to retrieve output parameters and return values after result sets have been fetched from a stored procedure (for those back ends which don't make the former available until the latter have been retrieved). Again, while this is another area where it would be tempting to say "don't do that" the client-side developer doesn't always have the luxury of dictating what happens on the server, as has been pointed out by others in this thread. Furthermore, I don't think the back end behavior in this case is unreasonable. It makes sense that (for example) the result code representing the outcome of a stored procedure might not be known until all of the statements contained in the procedure have been executed and any possible exceptions caught by the stored procedure code. And it would be at least as unreasonable to expect the back end to cache an unlimited amount of result set data before any of it has been fetched by the client in order to support callproc() as currently specified as it is to expect the client-side driver to perform such caching. The solution that comes to mind would be the decoupling of the invocation of the stored procedure from the retrieval of the return value and output parameters, as (for example) the ODBC API does. [1] http://python.org/topics/database/DatabaseAPI-2.0.html -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From matt@zope.com Fri Sep 14 13:50:45 2001 From: matt@zope.com (Matthew T. Kromer) Date: Fri, 14 Sep 2001 08:50:45 -0400 Subject: [DB-SIG] runInstaller problem with Oracle client installation In-Reply-To: <20010913211103.83920.qmail@web14706.mail.yahoo.com> Message-ID: on 9/13/01 5:11 PM, Titu Kim at kimtitu@yahoo.com wrote: > Hi, > I downloaded the whole tar ball of oracle for > linux. After logging in as oracle, i execute > 'runInstaller' under install directory. Then i get a > message saying something similar to "Initializing Java > Virtual Machine from > ../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/bin/jre > Please wait..." After this message, i wait forever and > i cannot get the prompt back with Return key. Can > somebody help me with this problem? Thanks a lot. > > Kim Titu One of the tricks on a recent RH system is to export LD_ASSUME_KERNEL=2.2.5 so that the JVM functions properly. There are good sites you can find with google that cover Oracle installation. From matt@zope.com Fri Sep 14 14:09:59 2001 From: matt@zope.com (Matthew T. Kromer) Date: Fri, 14 Sep 2001 09:09:59 -0400 Subject: [DB-SIG] mxODBC and Stored Procedures In-Reply-To: Message-ID: on 9/14/01 8:10 AM, Bob Kline at bkline@rksystems.com wrote: > On Thu, 13 Sep 2001, M.-A. Lemburg wrote: > >> The 3.0 proposal was really more about a proposal for a DBI wrapper >> around DB API compliant modules. In that sense it did not really >> target the DB API itself. >> >> Which are the issues with DB API 2.0 ? > > Well, there's one issue surrounding the specification of the > executemany() method, which requires the implementor to cache an > unbounded amount of result-set data (breaking the client-server > paradigm) or to discard that data. I submitted a patch for the spec, > and received a reply that it had been applied, but apparently not, as > the SIG's web site[1] still has the old language. > [...] > The solution that comes to mind would be the decoupling of the > invocation of the stored procedure from the retrieval of the return > value and output parameters, as (for example) the ODBC API does. > > [1] http://python.org/topics/database/DatabaseAPI-2.0.html Hmm. There's a lot you can talk about here. First, to my mind, allowing executemany() to operate on SELECT statements is highly problematic, and almost (but not quite) useless w.r.t. just decomposing it into a loop of SELECT statments. Clearly, some database systems can chain result sets together, or the driver can do it -- but I've yet to see a really compelling reason to support this for SELECTs. Even the ability to use executemany() with a RETURNING INTO clause for an update or delete is problematic. I would, in some ways, prefer to eliminate the notion of executemany() iteratively executing the statement, instead emphasizing that it is providing array input to its statement to operate on multiple rows at a time (which then begs the question of why API 1's convention of doing it all in execute() was discarded). Clearly, array input to SELECT is problematic (and I have no idea what the various RDBMS solutions do with it). Second, to stored procedures -- I'm not quite sure I follow -- because it depends on whether the RDBMS synchronously executes your stored procedure. Any procedure returning OUT variables should block until those values are ready. I would argue that pretty much any RDBMS should block during the internal execution of a statement, rather than doing an early return and deferring the start of a subsequent fetch() unless you specifically request it to operate asynchronously. Since writing an asynchronous python driver for an RDBMS would be a royal PITA compared to writing a threaded one, I am getting a trifle confused why there is a problem. From bkline@rksystems.com Fri Sep 14 14:50:09 2001 From: bkline@rksystems.com (Bob Kline) Date: Fri, 14 Sep 2001 09:50:09 -0400 (EDT) Subject: [DB-SIG] mxODBC and Stored Procedures In-Reply-To: Message-ID: On Fri, 14 Sep 2001, Matthew T. Kromer wrote: > First, to my mind, allowing executemany() to operate on SELECT > statements is highly problematic, ... Correct. In an earlier thread this year I laid out a lengthy explanation of why this is so. I submitted a patch which makes it clear that any invocation of executemany() with statements which produced results sets constitutes undefined behavior, but it's not clear that it was actually applied, despite the confirmation I received that it was. > Second, to stored procedures -- I'm not quite sure I follow -- > because it depends on whether the RDBMS synchronously executes your > stored procedure. Any procedure returning OUT variables should block > until those values are ready. I would argue that pretty much any > RDBMS should block during the internal execution of a statement, > rather than doing an early return and deferring the start of a > subsequent fetch() unless you specifically request it to operate > asynchronously. > > Since writing an asynchronous python driver for an RDBMS would be a > royal PITA compared to writing a threaded one, I am getting a trifle > confused why there is a problem. There is no need to write an asynchronous driver. The sequence (from the client's point of view) is: 1. Invoke the procedure. 2. Fetch any results sets. 3. Retrieve any output parameters (include procedure return value). ODBC handles this properly. The fact that the method for invoking the procedure returns immediately does not mean that the RDBMS is doing any asynchronous processing. It's sitting there waiting until the client end of the connection retrieves any results sets which are produced. Only then are the output parameters made available. The secret is to avoid assuming that the invocation of the stored procedure and the retrieval of the output parameters can be bundled into a single call at the client. These two steps must be made available separately in order to handle the general case properly. -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From matt@zope.com Fri Sep 14 15:36:58 2001 From: matt@zope.com (Matthew T. Kromer) Date: Fri, 14 Sep 2001 10:36:58 -0400 Subject: [DB-SIG] Stored Procedures References: Message-ID: <3BA2160A.8010308@zope.com> Bob Kline wrote: > >There is no need to write an asynchronous driver. The sequence (from >the client's point of view) is: > > 1. Invoke the procedure. > 2. Fetch any results sets. > 3. Retrieve any output parameters (include procedure return value). > >ODBC handles this properly. The fact that the method for invoking the >procedure returns immediately does not mean that the RDBMS is doing any >asynchronous processing. It's sitting there waiting until the client >end of the connection retrieves any results sets which are produced. >Only then are the output parameters made available. > >The secret is to avoid assuming that the invocation of the stored >procedure and the retrieval of the output parameters can be bundled into >a single call at the client. These two steps must be made available >separately in order to handle the general case properly. > Well, from the point of view of the Oracle API, "results" aren't fetched at all to stored procedures, rather, they're bound before the procedure executes, so before execution is complete, the results have to be transfered to the client and stored in the bound variables. Generally, I was not aware of semantics whereby the output of a procedure may be picked up after execution -- although this is probably highly RDBMS dependant. At least for the OCI driver I've been involved with, in order to execute the procedure properly, you must know its IN and OUT binds before calling it (ie a schema describe operation takes place) since there is no operation that I'm aware of that would allow you to otherwise 'punt' albeit with positional parameters you could probably get close. Of course, I also go through some gymnastics to allow stored procedures to be used in a different format, e.g. (out1, out2, ..., outn) = cursor.procedures.schema.package.procedure(in1, in2, ..., inn) and also to populate a __doc__ string so you can get a human-readable idea of what a stored procedure wants, e.g. print c.procedures.find.__doc__ On a side note, I've always been a bit dissapointed by how long it takes to actually wrap data from the RDBMS to python. For example, my C layer API can retrieve 39100 results from a Zip code table in .7 seconds (actually fetching the data into an opaque result set); yet the operation of turning these into python values adds an additional 2.4 seconds -- by the time it goes through all of the python layered above, it blows out to about 9 seconds for a fetchall(). Granted, part of that is because that code is not highly optimized, but it still irks me. It also makes me inclined to add some sort of skip() operator or cursors, to do a fast discard of a certain number of results, particulary for those type of queries which are generated by web pages, e.g. "give me the first 20 results" then "give me the first 40 results, and I'll throw away the first 20" etc. Oracle 9i has introduced a scrollable cursor, which I haven't had the time to play with. I think other DBMS systems have had this ability for a while. From bkline@rksystems.com Fri Sep 14 16:07:33 2001 From: bkline@rksystems.com (Bob Kline) Date: Fri, 14 Sep 2001 11:07:33 -0400 (EDT) Subject: [DB-SIG] Stored Procedures In-Reply-To: <3BA2160A.8010308@zope.com> Message-ID: On Fri, 14 Sep 2001, Matthew T. Kromer wrote: > Well, from the point of view of the Oracle API, "results" aren't > fetched at all to stored procedures, rather, they're bound before > the procedure executes, ... That's the way SQL Server does it, too. But the documentation makes it clear that you cannot to use the bound variables until after all results sets have been retrieved. I don't have the Oracle docs in the office I'm in right now, but I wouldn't be surprised if that's also true for Oracle. > ... so before execution is complete, the results have to be transfered > to the client and stored in the bound variables. The second half of your sentence does not necessarily follow from the first half. For example, an ODBC driver which is using the protocol on the wire (TDS, for instance) can tell when there are no more results sets and then retrieve the output parameter values and procedure return value from the incoming stream, storing them in the bound variables. The best that a higher-level API can do, if it cannot assume that an implementation will always have non-invasive access [1] to the information that there are no more results sets, is to have the client code explicitly request the output parameter values. The driver must assume in this case that the client code has determined that there are there are no more results sets (either by prior knowledge or by fetching the results sets until they have been exhausted). [1] By "non-invasive" I mean that we cannot expect the driver to fetch and cache all results set data in order to determine when there are no more results sets. -- Bob Kline mailto:bkline@rksystems.com http://www.rksystems.com From kimtitu@yahoo.com Fri Sep 14 19:05:50 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 14 Sep 2001 11:05:50 -0700 (PDT) Subject: [DB-SIG] runInstaller problem with Oracle client installation In-Reply-To: Message-ID: <20010914180550.94869.qmail@web14708.mail.yahoo.com> Yes, AFter setting this (LD_ASSUME_KERNEL)variable, the GUI starts and i can proceed. One note: i do download three rpm compatibility packages and install them before i export the variable. I don't know which step clear the hinder but this reminder may be helpful for others who may encounter similar problem. Thanks you all. Kimtitu --- "Matthew T. Kromer" wrote: > on 9/13/01 5:11 PM, Titu Kim at kimtitu@yahoo.com > wrote: > > > Hi, > > I downloaded the whole tar ball of oracle for > > linux. After logging in as oracle, i execute > > 'runInstaller' under install directory. Then i get > a > > message saying something similar to "Initializing > Java > > Virtual Machine from > > > ../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/linux/bin/jre > > Please wait..." After this message, i wait forever > and > > i cannot get the prompt back with Return key. Can > > somebody help me with this problem? Thanks a lot. > > > > Kim Titu > > One of the tricks on a recent RH system is to > > export LD_ASSUME_KERNEL=2.2.5 > > so that the JVM functions properly. There are good > sites you can find with > google that cover Oracle installation. > __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From kimtitu@yahoo.com Fri Sep 14 19:22:09 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 14 Sep 2001 11:22:09 -0700 (PDT) Subject: [DB-SIG] Client Option for Oracle Message-ID: <20010914182209.97891.qmail@web14708.mail.yahoo.com> Hi, Sorry to bother all of you again.I finally get the Java GUI show up(what a painful experience but sweet), now i want to install client library for python program that i am going to write so it can access the oracle server on other machine on the network. I choose Programmer option under client installation. Is this the only library i need? Thanks . Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From kimtitu@yahoo.com Fri Sep 14 19:47:00 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 14 Sep 2001 11:47:00 -0700 (PDT) Subject: [DB-SIG] Installation Relink Error in Oracle Client Message-ID: <20010914184700.34614.qmail@web14704.mail.yahoo.com> Hi all, The sweet feeling does not last long. It becomes bitter again after 3 minutes. I thought i will succeed this time without further trouble but i am wrong. I encounter several errors that i have no clue to tackle with. The first error comes out at the beginning saying "Thrown when IP host cannot be determined". I choose "Ignore" at this error. Then the installation going smoothly and i see the prompt saying Installation Success. While The process relink the library and make file, i encounter three errors. I choose igonore when the first error comes up. Then the second and the third. I quit the installation. These three errors are : 1. 'Error in invoking target relink of makefile /u01/appproduct/8.1.7/precomp/lib/ins_precomp.mk" 2. 'Error in invoking target relink of makefile /u01/appproduct/8.1.7/sqlplus/lib/ins_sqlplus.mk" 3. 'Error in invoking target relink of makefile /u01/appproduct/8.1.7/network/lib/ins_net_client.mk" I believe more errors will come up if i keeping ignoring previous errors. What exactly i have done wrong in the process? Do i missing something important again? I appreciate all of your time. Kim Titu. __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From djc@object-craft.com.au Sat Sep 15 07:51:41 2001 From: djc@object-craft.com.au (Dave Cole) Date: 15 Sep 2001 16:51:41 +1000 Subject: [DB-SIG] Sybase module 0.32 released In-Reply-To: Dave Cole's message of "03 Aug 2001 11:47:04 +1000" References: Message-ID: What is it: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. Commercial support is available for this module. Please refer to our website for details: http://www.object-craft.com.au/support.html For those people who do not have LaTeX installed there is a PDF document. These is also a PostScript document which prints out a handy A5 booklet on an A4 duplex printer. The module and documentation are all available on here: http://www.object-craft.com.au/projects/sybase/ Changes for this release ------------------------ There are no functional changes in this release. Extra conditional compilation logic has been added to allow the module to compile with more releases of Sybase. In particular, the module will compile with Sybase 11.0.3 again. - Dave -- http://www.object-craft.com.au From danny.kohn@systematik.se Sun Sep 16 23:46:54 2001 From: danny.kohn@systematik.se (Danny Kohn) Date: Mon, 17 Sep 2001 00:46:54 +0200 Subject: [DB-SIG] Howto generlize database descriptions Message-ID: Hi. Just started with both Python and MySQL. After some initial grasping = problems I found the MySQLdb FAQ and read the "really clueless" section = and can now successfully send SQL statements and receive data table data = to and from a Python program. My problem, I am sure, must have been thought about many times but still = I am not able to find a good tip for how to solve it in Python.=20 I would like an effective way of creating the database with all it's = tables and access the data tables and understand what's in the records = all from one source. The goal is of casue to not have to change all = parts of a program once I find that I need to change the database/table = layouts.=20 I guess that tuples or tuples in tuples may be a way to describe it but = then, how efficient with the program execution be with all these = references being used every time. I'm looking for something like = define/struc in C where I can build my database from and then use the = exact same data to access it. Anyone that understand what I want to say and has a good solution? If so = this newbee would appreciate a small coding example that I could = understand, change in and expand. /Danny From kimtitu@yahoo.com Mon Sep 17 19:19:19 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Mon, 17 Sep 2001 11:19:19 -0700 (PDT) Subject: [DB-SIG] DCOracle2 install help. Message-ID: <20010917181919.34935.qmail@web14702.mail.yahoo.com> Hi, all, After one three days battle, i got oracle client running on my LInux 7.1. I am more than happy to share the bitter experince if someone need that. Now, i have to install python db module DCOracle2. Since i use python 2.2.1, i may not(may i?) use the pre-compiled binaries. I rebuild it and i have the dco2.so file. I copy it and put in under /usr/local/lib/python2.1/DCOracle2/dco2.so. Then i enter python interactive environment to import this module using 'import DCOracle2'. The module is not found. What have i done wrong? Any suggestion or advice is very appreciated. Thanks. Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From matt@zope.com Mon Sep 17 20:03:46 2001 From: matt@zope.com (Matthew T. Kromer) Date: Mon, 17 Sep 2001 15:03:46 -0400 Subject: [DB-SIG] DCOracle2 install help. References: <20010917181919.34935.qmail@web14702.mail.yahoo.com> Message-ID: <3BA64912.4080107@zope.com> Titu Kim wrote: >Hi, all, > After one three days battle, i got oracle client >running on my LInux 7.1. I am more than happy to share >the bitter experince if someone need that. Now, i have >to install python db module DCOracle2. Since i use >python 2.2.1, i may not(may i?) use the pre-compiled >binaries. I rebuild it and i have the dco2.so file. I >copy it and put in under >/usr/local/lib/python2.1/DCOracle2/dco2.so. Then i >enter python interactive environment to import this >module using 'import DCOracle2'. The module is not >found. What have i done wrong? Any suggestion or >advice is very appreciated. Thanks. > >Kim Titu > >__________________________________________________ >Terrorist Attacks on U.S. - How can you help? >Donate cash, emergency relief information >http://dailynews.yahoo.com/fc/US/Emergency_Information/ > >_______________________________________________ >DB-SIG maillist - DB-SIG@python.org >http://mail.python.org/mailman/listinfo/db-sig > Depending on how you did things, there are two levels to DOracle2 and Zope, the DA, and the actual database adapter. It looks like you're trying to install the python adapter in the system libraries, which of course, is probably /usr/local/lib/python2.1/lib/python for you, not /usr/local/lib/python2.1 unless you changed the default library paths (ie I am assuming you just configured python with configure --prefix=/usr/local/lib/python2.1 ) Since I cant tell how you built python, I dont know where its supposed to go. However, you should be able to CD to that directory and just run python manually and have it work. From kimtitu@yahoo.com Mon Sep 17 21:52:13 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Mon, 17 Sep 2001 13:52:13 -0700 (PDT) Subject: [DB-SIG] DCOracle2 install help. In-Reply-To: <3BA64912.4080107@zope.com> Message-ID: <20010917205213.80188.qmail@web14708.mail.yahoo.com> Hi Matthew and all, Your reply triggers an idea for me. I make a symbolic link from /usr/bin/python to /usr/local/bin/python and then rebuitd the binaries. Then i copy the whole DCOracle2 directory to /usr/local/lib/python2.1/DCOracle2. It works. Everything works fine now.I can do db connection and make queries to db and retrieve result using fetch**. This works perfectly in interactive mode or in a separate file. However, when i port the same program to cgi-bin, i get error when trying to establish a connection. Apache gives this error """""""" Traceback(most recent call last): File "/var/www/cgi-bin/mycgi.cgi" line 6, in ? conn = DCOracle2.py", line 116 in connect dco2.DatabaseError:(12154, 'Error while trying to retrieve text for error ORA-12154') Premature end of script headers:/var/www/cgi-bin/mycgi.cgi """""""""""""" Why the standalone program work fine but does not work with cgi? Do you have any comment? Thanks a lot. Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From matt@zope.com Mon Sep 17 22:12:50 2001 From: matt@zope.com (Matthew T. Kromer) Date: Mon, 17 Sep 2001 17:12:50 -0400 Subject: [DB-SIG] DCOracle2 install help. References: <20010917205213.80188.qmail@web14708.mail.yahoo.com> Message-ID: <3BA66752.8060509@zope.com> Titu Kim wrote: >Hi Matthew and all, > Your reply triggers an idea for me. I make a >symbolic link from /usr/bin/python to >/usr/local/bin/python and then rebuitd the binaries. >Then i copy the whole DCOracle2 directory to >/usr/local/lib/python2.1/DCOracle2. It works. >Everything works fine now.I can do db connection and >make queries to db and retrieve result using fetch**. >This works perfectly in interactive mode or in a >separate file. However, when i port the same program >to cgi-bin, i get error when trying to establish a >connection. Apache gives this error >"""""""" >Traceback(most recent call last): > File "/var/www/cgi-bin/mycgi.cgi" line 6, in ? > conn = DCOracle2.py", line 116 in connect > dco2.DatabaseError:(12154, 'Error while trying to >retrieve text for error ORA-12154') >Premature end of script >headers:/var/www/cgi-bin/mycgi.cgi > >"""""""""""""" >Why the standalone program work fine but does not work >with cgi? Do you have any comment? Thanks a lot. > >Kim Titu > When it cannot retreive the error message text, that means "I don't have ORACLE_HOME" set -- set your ORACLE_HOME environment for your web server. > From ChuckEsterbrook@yahoo.com Tue Sep 18 00:19:51 2001 From: ChuckEsterbrook@yahoo.com (Chuck Esterbrook) Date: Mon, 17 Sep 2001 16:19:51 -0700 Subject: [DB-SIG] Re: DB-SIG digest, Vol 1 #473 - 1 msg In-Reply-To: Message-ID: <5.1.0.14.0.20010917161832.03114ec0@mail> At 12:01 PM 9/17/2001 -0400, db-sig-request@python.org wrote: >I would like an effective way of creating the database with all it's >tables and access the data tables and understand what's in the records all >from one source. The goal is of casue to not have to change all parts of a >program once I find that I need to change the database/table layouts. Check out MiddleKit in Webware. It does this to a large extent. I highly recommend that you use CVS for Webware if you are a MiddleKit user as there are many improvements there. http://webware.sourceforge.net/ We currently support MySQL and MSSQL with a PostgreSQL patch coming down the pipe. -Chuck From mal@lemburg.com Tue Sep 18 15:03:50 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 18 Sep 2001 16:03:50 +0200 Subject: [DB-SIG] Fetching result sets References: <3BA2160A.8010308@zope.com> Message-ID: <3BA75446.DD3DBB8E@lemburg.com> "Matthew T. Kromer" wrote: > > ... > Well, from the point of view of the Oracle API, "results" aren't fetched > at all to stored procedures, rather, they're bound before the procedure > executes, so before execution is complete, the results have to be > transfered to the client and stored in the bound variables. > Generally, I was not aware of semantics whereby the output of a > procedure may be picked up after execution -- although this is probably > highly RDBMS dependant. Indeed, it is... and it's certainly not something which a Python should be made to think about :-) > At least for the OCI driver I've been involved with, in order to execute > the procedure properly, you must know its IN and OUT binds before > calling it (ie a schema describe operation takes place) since there is > no operation that I'm aware of that would allow you to otherwise 'punt' > albeit with positional parameters you could probably get close. Of > course, I also go through some gymnastics to allow stored procedures to > be used in a different format, e.g. > > (out1, out2, ..., outn) = > cursor.procedures.schema.package.procedure(in1, in2, ..., inn) > > and also to populate a __doc__ string so you can get a human-readable > idea of what a stored procedure wants, e.g. print c.procedures.find.__doc__ Note: the DB API method would be cursor.callproc(procname, parameters). > On a side note, I've always been a bit dissapointed by how long it takes > to actually wrap data from the RDBMS to python. For example, my C layer > API can retrieve 39100 results from a Zip code table in .7 seconds > (actually fetching the data into an opaque result set); yet the > operation of turning these into python values adds an additional 2.4 > seconds -- by the time it goes through all of the python layered above, > it blows out to about 9 seconds for a fetchall(). Granted, part of that > is because that code is not highly optimized, but it still irks me. Well, this is most certainly due to the fact that Python stores the values in objects rather than a C array. (You could, however, try to use the array module for faster access to these values.) > It also makes me inclined to add some sort of skip() operator or > cursors, to do a fast discard of a certain number of results, > particulary for those type of queries which are generated by web pages, > e.g. "give me the first 20 results" then "give me the first 40 results, > and I'll throw away the first 20" etc. Oracle 9i has introduced a > scrollable cursor, which I haven't had the time to play with. I think > other DBMS systems have had this ability for a while. Again, this is highly DB dependent. I am thinking of adding forward scrolling to the cursor objects in mxODBC. The ODBC 2.x APIs for this are horrible, but ODBC 3.x adds some nice new ones which make the task easier. I'd suggest using .scroll(offset) as name for such a method. offset could then be an integer (negative integers scroll backwards if the DB provides this feature). DBs interfaces not capable of scrolling should not implement the method or raise a NotImplemented exception when called. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From TKeating@origin.ea.com Tue Sep 18 16:03:11 2001 From: TKeating@origin.ea.com (Keating, Tim) Date: Tue, 18 Sep 2001 10:03:11 -0500 Subject: [DB-SIG] Fetching result sets Message-ID: <2292DBED5A978A498EABCCE95524499E0281D64C@osi-postal.osi.ad.ea.com> > > On a side note, I've always been a bit dissapointed by how > long it takes > > to actually wrap data from the RDBMS to python. For > example, my C layer > > API can retrieve 39100 results from a Zip code table in .7 seconds > > (actually fetching the data into an opaque result set); yet the > > operation of turning these into python values adds an additional 2.4 > > seconds -- by the time it goes through all of the python > layered above, > > it blows out to about 9 seconds for a fetchall(). Granted, > part of that > > is because that code is not highly optimized, but it still irks me. > > Well, this is most certainly due to the fact that Python stores > the values in objects rather than a C array. (You could, however, > try to use the array module for faster access to these values.) Actually, the way to do large homogeneous ops in oracle is to use bulk binding w/ PL/SQL tables. Unfortunately, I don't believe DCOracle2 supports this currently. (For that matter, does the Python DB API?) I recently had to do this, writing an application-specific module on top of OTL. Inserting 1000 rows manually (i.e. doing 1000 INSERT statements) took about 4 seconds, bulk binding was .4 seconds. However, while 10K rows took 40 seconds with individual inserts (as expected), the cost of bulk binding merely doubled (.8 seconds). TK From matt@zope.com Tue Sep 18 17:12:43 2001 From: matt@zope.com (Matthew T. Kromer) Date: Tue, 18 Sep 2001 12:12:43 -0400 Subject: [DB-SIG] Fetching result sets References: <2292DBED5A978A498EABCCE95524499E0281D64C@osi-postal.osi.ad.ea.com> Message-ID: <3BA7727B.6010707@zope.com> Keating, Tim wrote: >>>On a side note, I've always been a bit dissapointed by how >>> >>long it takes >> >>>to actually wrap data from the RDBMS to python. For >>> >>example, my C layer >> >>>API can retrieve 39100 results from a Zip code table in .7 seconds >>>(actually fetching the data into an opaque result set); yet the >>>operation of turning these into python values adds an additional 2.4 >>>seconds -- by the time it goes through all of the python >>> >>layered above, >> >>>it blows out to about 9 seconds for a fetchall(). Granted, >>> >>part of that >> >>>is because that code is not highly optimized, but it still irks me. >>> >>Well, this is most certainly due to the fact that Python stores >>the values in objects rather than a C array. (You could, however, >>try to use the array module for faster access to these values.) >> > >Actually, the way to do large homogeneous ops in oracle is to use bulk >binding w/ PL/SQL tables. Unfortunately, I don't believe DCOracle2 supports >this currently. (For that matter, does the Python DB API?) > >I recently had to do this, writing an application-specific module on top of >OTL. Inserting 1000 rows manually (i.e. doing 1000 INSERT statements) took >about 4 seconds, bulk binding was .4 seconds. However, while 10K rows took >40 seconds with individual inserts (as expected), the cost of bulk binding >merely doubled (.8 seconds). > Actually, I do do bulk binds, as you put it... the down side is, I normally use dynamic vs static binds, and Oracle tends to puke on dynamic fetches -- it will randomly SKIP the callback on linux. So I also have a setStatic() tweak (which is currently used) to change them into static binds when they are read-only. When I was last actively looking at it, THAT puked on Solaris (usually one or the other works, though). The executemany() op when given an array will set it up as a large array bind; although I think the limit imposed in the python layer is like 200 rows at a time. My test databases usually aren't set up for fast-write speeds though, so it's hard for me to give accurate "it's THIS much faster" numbers. My test program is a zipcode table creator, which puts in 39100 zip codes with zip, city, state, country, latitude, longitude and the two test programs yeilded the following results: record-at-a-time: 148 seconds or 0.004 sec/record 1000 record batches: 38 seconds or 0.001 sec/record The loader does a commit every 1000 records, which slows things down. I would expect a higher than 4x speedup, which is why I expect either something is a bit wrong or it just takes a LOT of overhead to move data from python objects to buffers. I'm sure my python-side code could be accelerated. From mal@lemburg.com Tue Sep 18 17:11:40 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 18 Sep 2001 18:11:40 +0200 Subject: [DB-SIG] Fetching result sets References: <2292DBED5A978A498EABCCE95524499E0281D64C@osi-postal.osi.ad.ea.com> Message-ID: <3BA7723C.D071FE77@lemburg.com> "Keating, Tim" wrote: > > > > On a side note, I've always been a bit dissapointed by how > > long it takes > > > to actually wrap data from the RDBMS to python. For > > example, my C layer > > > API can retrieve 39100 results from a Zip code table in .7 seconds > > > (actually fetching the data into an opaque result set); yet the > > > operation of turning these into python values adds an additional 2.4 > > > seconds -- by the time it goes through all of the python > > layered above, > > > it blows out to about 9 seconds for a fetchall(). Granted, > > part of that > > > is because that code is not highly optimized, but it still irks me. > > > > Well, this is most certainly due to the fact that Python stores > > the values in objects rather than a C array. (You could, however, > > try to use the array module for faster access to these values.) > > Actually, the way to do large homogeneous ops in oracle is to use bulk > binding w/ PL/SQL tables. Unfortunately, I don't believe DCOracle2 supports > this currently. (For that matter, does the Python DB API?) The .executemany() method may implement bulk binding; in general, the Python programmer shouldn't have to care about these implementation details, only the interface writer. > I recently had to do this, writing an application-specific module on top of > OTL. Inserting 1000 rows manually (i.e. doing 1000 INSERT statements) took > about 4 seconds, bulk binding was .4 seconds. However, while 10K rows took > 40 seconds with individual inserts (as expected), the cost of bulk binding > merely doubled (.8 seconds). There could be two reasons: 1. the driver does network communication for each INSERT 2. the driver has to parse the SQL for each INSERT The second problem can be avoided by reusing the same SQL statement for the iterations. Not all databases support this though; ODBC does (by separating the prepare and execute steps). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From kimtitu@yahoo.com Tue Sep 18 19:56:46 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Tue, 18 Sep 2001 11:56:46 -0700 (PDT) Subject: [DB-SIG] URL redirection Message-ID: <20010918185646.14598.qmail@web14708.mail.yahoo.com> Hi, I am trying to implement a cgi script in python which will lookup database as user sign in. It will redirect the user to different url based on the class of the user. How can i implement the url redirection mechanism in python? Thank you very much. Are there any good examples for web programming to look at for this case? Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From fog@mixadlive.com Tue Sep 18 19:50:50 2001 From: fog@mixadlive.com (Federico Di Gregorio) Date: 18 Sep 2001 20:50:50 +0200 Subject: [DB-SIG] URL redirection In-Reply-To: <20010918185646.14598.qmail@web14708.mail.yahoo.com> References: <20010918185646.14598.qmail@web14708.mail.yahoo.com> Message-ID: <1000839051.3300.8.camel@lola> On Tue, 2001-09-18 at 20:56, Titu Kim wrote: > Hi, > I am trying to implement a cgi script in python > which will lookup database as user sign in. It will > redirect the user to different url based on the class > of the user. How can i implement the url redirection > mechanism in python? Thank you very much. Are there > any good examples for web programming to look at for > this case? you're asking the wrong half of the question. this list is about how to lookup user data in the db. i suggest you to use one of the frameworks better suited for building web sites, like webware ot zope. both provide db access using any of the dbapi compliant drivers. hope this helps, federico -- Federico Di Gregorio MIXAD LIVE Chief of Research & Technology fog@mixadlive.com Debian GNU/Linux Developer & Italian Press Contact fog@debian.org Those who do not study Lisp are doomed to reimplement it. Poorly. -- from Karl M. Hegbloom .signature From andy47@crosswinds.net Thu Sep 20 03:16:43 2001 From: andy47@crosswinds.net (Andy Todd) Date: Thu, 20 Sep 2001 12:16:43 +1000 Subject: [DB-SIG] Current status of Gadfly Message-ID: <3BA9518B.3020203@crosswinds.net> Does anyone know of the current status of Gadfly? Looking at the web site (http://www.chordate.com/gadfly.html) it doesn't appear to have been updated since late 1998. When I fire it up under Python 2.1 there are deprecation warnings about the use of regex instead of re and it doesn't appear to use distutils. I'm happy to try and patch these things but don't want to re-invent the wheel if someone else has already addressed them. I'm also wondering if it is worthwhile emailing the maintainer (arw@ifu.net), has anyone had any correspondence with them recently? Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can" From matt@zope.com Thu Sep 20 12:20:54 2001 From: matt@zope.com (Matthew T. Kromer) Date: Thu, 20 Sep 2001 07:20:54 -0400 Subject: [DB-SIG] Current status of Gadfly In-Reply-To: <3BA9518B.3020203@crosswinds.net> Message-ID: on 9/19/01 10:16 PM, Andy Todd at andy47@crosswinds.net wrote: > Does anyone know of the current status of Gadfly? > [...] > When I fire it up under Python 2.1 there are deprecation warnings about > the use of regex instead of re and it doesn't appear to use distutils. > > I'm happy to try and patch these things but don't want to re-invent the > wheel if someone else has already addressed them. > [...] If you get a recent Zope, it has a patched Gadfly with no warnings. From andy@dustman.net Thu Sep 20 20:52:19 2001 From: andy@dustman.net (Andy Dustman) Date: 20 Sep 2001 15:52:19 -0400 Subject: [DB-SIG] MySQLdb-0.9.1 release candidate 2 In-Reply-To: <999876386.16799.10.camel@chef.comstar.net> References: <999876386.16799.10.camel@chef.comstar.net> Message-ID: <1001015539.23279.26.camel@chef.comstar.net> On Fri, 2001-09-07 at 11:26, Andy Dustman wrote: > If you're a MySQLdb user, try 0.9.1c1. This will become 0.9.1 final > barring any bug reports. Reported bugs will be fixed in 0.9.1. > Unreported bugs won't be. Same as above, only with 0.9.1c2. http://sourceforge.net/project/shownotes.php?release_id=51759 -- Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy You can have my keys when you pry them from my dead, cold neurons. From andy47@crosswinds.net Thu Sep 20 23:54:54 2001 From: andy47@crosswinds.net (Andy Todd) Date: Fri, 21 Sep 2001 08:54:54 +1000 Subject: [DB-SIG] Current status of Gadfly References: Message-ID: <3BAA73BD.5090109@crosswinds.net> Matthew T. Kromer wrote: > on 9/19/01 10:16 PM, Andy Todd at andy47@crosswinds.net wrote: > > >>Does anyone know of the current status of Gadfly? >>[...] >>When I fire it up under Python 2.1 there are deprecation warnings about >>the use of regex instead of re and it doesn't appear to use distutils. >> >>I'm happy to try and patch these things but don't want to re-invent the >>wheel if someone else has already addressed them. >>[...] >> > > If you get a recent Zope, it has a patched Gadfly with no warnings. > Thanks for that, although downloading a full blown content management system just to get a lightweight database does seem to be a little excessive to me ;-) I'll email Aaron Watters anyway and see what he has to say, if it's possible to patch the Gadfly sources he releases it may be a worthwhile exercise. Regards, Andy -- ----------------------------------------------------------------------- From the desk of Andrew J Todd esq. "Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can" From kimtitu@yahoo.com Fri Sep 21 18:44:24 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 21 Sep 2001 10:44:24 -0700 (PDT) Subject: [DB-SIG] Delete statement in DCOracle2 Message-ID: <20010921174424.66780.qmail@web14708.mail.yahoo.com> Hi, I am trying to delete some records from Oracle 8.1.7 using DCOracle2 module. I try the program in python interactive environment. Once i execute the delete statement, the program goes to infinite loop. If i hit control C, i see this error. ################################### TraceBack: most recent call last: File "", line 1,in ################################## I am sure i have proper connection and cursor because i can insert data into table. My delete query looks like this. cur=connection.cursor() cur.execute("Delete from table where id=%s"%1.0), where 1.0 is an arbitrary id number. What is going wrong in my query? Beside i also face a strange situation, the "select count(*) from table where colum=%s"%1.0 give me the some values in python interactive environment as well as in the program. However, when i check the result using sqlplus directly, the number is different. Even i delete all rows of that id, python still return some values. I don't understand what is going on in here, can somebody enlight me? Thank you very much for your precious time. Regards Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From kimtitu@yahoo.com Fri Sep 21 18:54:49 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 21 Sep 2001 10:54:49 -0700 (PDT) Subject: [DB-SIG] Delete Statement in DCOracle2 Message-ID: <20010921175449.52734.qmail@web14707.mail.yahoo.com> Hi, I am trying to delete some records from Oracle 8.1.7 using DCOracle2 module. I try the program in python interactive environment. Once i execute the delete statement, the program goes to infinite loop. If i hit control C, i see this error. ################################### TraceBack: most recent call last: File "", line 1,in ################################## I am sure i have proper connection and cursor because i can insert data into table. My delete query looks like this. cur=connection.cursor() cur.execute("Delete from table where id=%s"%1.0), where 1.0 is an arbitrary id number. What is going wrong in my query? Beside i also face a strange situation, the "select count(*) from table where colum=%s"%1.0 give me the some values in python interactive environment as well as in the program. However, when i check the result using sqlplus directly, the number is different. Even i delete all rows of that id, python still return some values. I don't understand what is going on in here, can somebody enlight me? Thank you very much for your precious time. Regards Kim Titu __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ From dhalgren@bigfoot.com Sat Sep 22 23:23:34 2001 From: dhalgren@bigfoot.com (dhalgren@bigfoot.com) Date: Sat, 22 Sep 2001 17:23:34 -0500 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? Message-ID: <3BACC916.9697.D7307D8@localhost> 0100,0100,0100Hey all - I've got a problem involving PostgreSQL and Python 2.1 . First off, I freely admit to being new to Python, and only having given this a few days of effort before deciding to post a query to the list. Now, I recently downloaded and began using Python. It's been a great adventure, and I'm extremely happy to have decided to pick up the language. But. I'm very interested in database-based applications, and my db of choice is PostgreSQL. I just can't seem to find a PostgreSQL support module that is being actively maintained. So far I've found -- (off the http://www.python.org/topics/database/modules.html page) PygreSQL -- went to the download web site, and it only seems to have been maintained up to version 7.02 of PostgreSQL and Python 1.5 . They talk about adding support for Python 2.0 in "the next release".... PoPy -- they claim "RPTimes New RomanM package is also available on our NEW project's web site" but then don't bother mentioning where that site is. I tried the website for the company that has apparently hired the development team, Nekhem.com, but the site is "being redesigned" and clearly doesn't have any packages for download. The PoPY project site also says they have CVS access available, but I've never used CVS, and I suppose I can give that a try sometime, but for various reasons I'd rather just manage all my packages with the same tools (RPM) as well as I'm not sure this group is still even maintaining thier package or website. Psycopg -- The website simply doesn't come up -it's another dead link. -------- So my question, simply enough is, is there a module available, anywhere, theat is being currently maintained and which I can use without having to go through ODBC? I tried, in desperation, installing the mx extensions package, but that required other packages (iODBC) which I haven't been able to track down yet. In any case, that was a second-best option. I'm really leaning towards direct connection without ODBC. Any suggestions for this newbie? Is there ever going to be db support in the standard Python distributions? --Aaron From darcy@druid.net Sun Sep 23 17:53:42 2001 From: darcy@druid.net (D'Arcy J.M. Cain) Date: Sun, 23 Sep 2001 12:53:42 -0400 (EDT) Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? In-Reply-To: <3BACC916.9697.D7307D8@localhost> from "dhalgren@bigfoot.com" at Sep 22, 2001 05:23:34 PM Message-ID: <20010923165342.BF9D81A6B@druid.net> Thus spake dhalgren@bigfoot.com > PygreSQL -- went to the download web site, and it only seems to have been > maintained up to version 7.02 of PostgreSQL and Python 1.5 . They talk > about adding support for Python 2.0 in "the next release".... PyGreSQL has moved into the PostgreSQL tree. To build it all you have to do is add --with-python to the configure command when building PostgreSQL. I guess I should update the page one of these days but is is definitely being maintained. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner. From Billy G. Allie" Message-ID: <200109231742.f8NHg4t19263@bajor.mug.org> --==_Exmh_-104624400P Content-Type: text/plain; charset=us-ascii db-sig-request@python.org wrote: > Hey all - > > I've got a problem involving PostgreSQL and Python 2.1 . > > First off, I freely admit to being new to Python, and only having given this a > few days of effort before deciding to post a query to the list. > > Now, I recently downloaded and began using Python. It's been a great > adventure, and I'm extremely happy to have decided to pick up the language. > But. I'm very interested in database-based applications, and my db of > choice is PostgreSQL. > > I just can't seem to find a PostgreSQL support module that is being actively > maintained. So far I've found -- > > (off the http://www.python.org/topics/database/modules.html page) Take a look at pyPgSQL at http://www.sourceforge.net/projects/pypgsql. It is being actively maintained, and works with Python 2.0, 2.1 and 2.2a3. A new release will be available soon. (it's currently at version 1.5.1). BTW: How do I get pyPgSQL listed on the http://www.python.org/topics/database/m odules.html page? -- ____ | Billy G. Allie | Domain....: Bill.Allie@mug.org | /| | 7436 Hartwell | MSN.......: B_G_Allie@email.msn.com |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | --==_Exmh_-104624400P Content-Type: application/pgp-signature -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii db-sig-request@python.org wrote: > Hey all - > > I've got a problem involving PostgreSQL and Python 2.1 . > > First off, I freely admit to being new to Python, and only having given this a > few days of effort before deciding to post a query to the list. > > Now, I recently downloaded and began using Python. It's been a great > adventure, and I'm extremely happy to have decided to pick up the language. > But. I'm very interested in database-based applications, and my db of > choice is PostgreSQL. > > I just can't seem to find a PostgreSQL support module that is being actively > maintained. So far I've found -- > > (off the http://www.python.org/topics/database/modules.html page) Take a look at pyPgSQL at http://www.sourceforge.net/projects/pypgsql. It is being actively maintained, and works with Python 2.0, 2.1 and 2.2a3. A new release will be available soon. (it's currently at version 1.5.1). BTW: How do I get pyPgSQL listed on the http://www.python.org/topics/database/m odules.html page? - -- ____ | Billy G. Allie | Domain....: Bill.Allie@mug.org | /| | 7436 Hartwell | MSN.......: B_G_Allie@email.msn.com |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (UnixWare) Comment: Exmh version 2.2 06/23/2000 iD8DBQE7rh7rnmIkMXoVVdURAmfaAJ0WA7APKpsInBAfVl0py87deN9XTACgonFl dTMPYpyit62wov7rKZ/r0Js= =BkLP -----END PGP SIGNATURE----- --==_Exmh_-104624400P-- From dieter@handshake.de Sun Sep 23 18:23:05 2001 From: dieter@handshake.de (Dieter Maurer) Date: Sun, 23 Sep 2001 19:23:05 +0200 (CEST) Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? In-Reply-To: <3BACC916.9697.D7307D8@localhost> References: <3BACC916.9697.D7307D8@localhost> Message-ID: <15278.6777.845147.635456@lindm.dm> dhalgren@bigfoot.com writes: > I just can't seem to find a PostgreSQL support module that is being > actively maintained. So far I've found -- > > (off the http://www.python.org/topics/database/modules.html page) There are several Python-PostGres Adapters around, though I do not have URL's for you at the moment. You should find lots of references with a Google search: site:zope@zope.org PostGres adapter Dieter From fog@mixadlive.com Sun Sep 23 19:09:04 2001 From: fog@mixadlive.com (Federico Di Gregorio) Date: 23 Sep 2001 20:09:04 +0200 Subject: [DB-SIG] Re: DB-SIG digest, Vol 1 #479 - 1 msg In-Reply-To: <200109231742.f8NHg4t19263@bajor.mug.org> References: <200109231742.f8NHg4t19263@bajor.mug.org> Message-ID: <1001268544.29500.7.camel@lola> On Sun, 2001-09-23 at 19:42, Billy G. Allie wrote: > db-sig-request@python.org wrote: > > Hey all - > > > > I've got a problem involving PostgreSQL and Python 2.1 . > > > > First off, I freely admit to being new to Python, and only having given this a > > few days of effort before deciding to post a query to the list. > > > > Now, I recently downloaded and began using Python. It's been a great > > adventure, and I'm extremely happy to have decided to pick up the language. > > But. I'm very interested in database-based applications, and my db of > > choice is PostgreSQL. > > > > I just can't seem to find a PostgreSQL support module that is being actively > > maintained. So far I've found -- > > > > (off the http://www.python.org/topics/database/modules.html page) > > Take a look at pyPgSQL at http://www.sourceforge.net/projects/pypgsql. It is > being actively maintained, and works with Python 2.0, 2.1 and 2.2a3. A new > release will be available soon. (it's currently at version 1.5.1). also psycopg, version 0.99.7 (we wont bump up to 1.0 until it is perfect, no bugs and 100% DBAPI compliance). you can download from zope.org or http://initd.org/Software/psycopg/ ciao, federico -- Federico Di Gregorio MIXAD LIVE Chief of Research & Technology fog@mixadlive.com Debian GNU/Linux Developer & Italian Press Contact fog@debian.org 99.99999999999999999999% still isn't 100% but sometimes suffice. -- Me From dhalgren@bigfoot.com Sun Sep 23 21:35:03 2001 From: dhalgren@bigfoot.com (dhalgren@bigfoot.com) Date: Sun, 23 Sep 2001 15:35:03 -0500 Subject: [DB-SIG] Thanks plus more newbie blues and the power/headache of source In-Reply-To: <200109231742.f8NHg4t19263@bajor.mug.org> References: Your message of "Sun, 23 Sep 2001 12:01:01 EDT." Message-ID: <3BAE0127.29997.12360ADB@localhost> > Take a look at pyPgSQL at http://www.sourceforge.net/projects/pypgsql. > It is being actively maintained, and works with Python 2.0, 2.1 and > 2.2a3. A new release will be available soon. (it's currently at > version 1.5.1). Thanks everyone for the informative/quick responses. Much appreciated !! As far as the "with python" option for PostgreSQL that a few folks mentioned, I'd give it a shot, but I'm also somewhat new to linux, and while I'd be willing ot install a package from source, about 1 out of 5 or so times I've tried I get GCC crashing partway through with dependency or other errors. That plus I am not comfy enough with the filesystem layout, etc, to know what goes where, etc. So I've been using RPMs. They are a poor substitute for any windows installer I've ever seen, but they generally get the job done and will generally manage install/uninstall and upgrades cleanly. So, for a follow-up question, if I can impose on the patience of the group yet again, is there a way to use the 'with python' instruction with a standard installer on Linux, or can it only be done when building the package? Is this something one would use 'source' RPMs for? --Aaron From fog@mixadlive.com Sun Sep 23 21:34:06 2001 From: fog@mixadlive.com (Federico Di Gregorio) Date: 23 Sep 2001 22:34:06 +0200 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? In-Reply-To: <3BACC916.9697.D7307D8@localhost> References: <3BACC916.9697.D7307D8@localhost> Message-ID: <1001277246.29502.12.camel@lola> On Sun, 2001-09-23 at 00:23, dhalgren@bigfoot.com wrote: > Psycopg -- The website simply doesn't come up -it's another dead link. we had some problems with a storm that hit our office location (the electrical grid there is in a bad shape and UPS does not last forever). site should be up at now. -- Federico Di Gregorio MIXAD LIVE Chief of Research & Technology fog@mixadlive.com Debian GNU/Linux Developer & Italian Press Contact fog@debian.org Quis custodiet ipsos custodes? -- Juvenal, Satires, VI, 347 From pcm@mixadlive.com Sun Sep 23 20:46:32 2001 From: pcm@mixadlive.com (Paolo Comitini) Date: Sun, 23 Sep 2001 21:46:32 +0200 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? In-Reply-To: <3BACC916.9697.D7307D8@localhost> References: <3BACC916.9697.D7307D8@localhost> Message-ID: <20010924064313.2B3621845B@developers.parella.mixadlive> On Sunday 23 September 2001 00:23, dhalgren@bigfoot.com wrote: > 0100,0100,0100Hey all - > > > I've got a problem involving PostgreSQL and Python 2.1 . > > > First off, I freely admit to being new to Python, and only having given > this a few days of effort before deciding to post a query to the list. > > > Now, I recently downloaded and began using Python. It's been a great > adventure, and I'm extremely happy to have decided to pick up the language. > But. I'm very interested in database-based applications, and my db of > choice is PostgreSQL. > > > I just can't seem to find a PostgreSQL support module that is being > actively maintained. So far I've found -- > > > (off the http://www.python.org/topics/database/modules.html page) > > > PygreSQL -- went to the download web site, and it only seems to have been > maintained up to version 7.02 of PostgreSQL and Python 1.5 . They talk > about adding support for Python 2.0 in "the next release".... > > > PoPy -- they claim "RPTimes New RomanM package > is also available on our NEW project's web site" but then > don't bother mentioning where that site is. I tried the website for the > company that has apparently hired the development team, Nekhem.com, but the > site is "being redesigned" and clearly doesn't have any packages for > download. The PoPY project site also says they have CVS access available, > but I've never used CVS, and I suppose I can give that a try sometime, but > for various reasons I'd rather just manage all my packages with the same > tools (RPM) as well as I'm not sure this group is still even maintaining > thier package or website. Popy was the driver of Mixad Live s.r.l. but one day we decided to develop Psycopg from scracth! And now we have a real outperforming drive: http://www.initd.org/Software/psycopg > > Psycopg -- The website simply doesn't come up -it's another dead link. Sorry now the site is up, try again now: http://www.initd.org or in case of failure you can find always a copy of the tarball on http://www.zope.org/Members/fog/psycopg but if you are on windows ... we don't have windows. Paolo > > -------- > > So my question, simply enough is, is there a module available, anywhere, > theat is being currently maintained and which I can use without having to > go through ODBC? I tried, in desperation, installing the mx extensions > package, but that required other packages (iODBC) which I haven't been able > to track down yet. In any case, that was a second-best option. I'm really > leaning towards direct connection without ODBC. > > Any suggestions for this newbie? Is there ever going to be db support in > the standard Python distributions? > > --Aaron > > > > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > http://mail.python.org/mailman/listinfo/db-sig -- Paolo Comitini paolo.comitini@mixadlive.com Mixad Live s.r.l. http://www.mixadlive.com tel +39-0125-669020, fax +39-0125-668984 via della Cartiera 2 10010 - Parella (TO) Italy From paul@boddie.net Mon Sep 24 10:38:42 2001 From: paul@boddie.net (paul@boddie.net) Date: 24 Sep 2001 09:38:42 -0000 Subject: [DB-SIG] Delete Statement in DCOracle2 Message-ID: <20010924093842.22668.qmail@www3.nameplanet.com> Titu Kim wrote: > > I am trying to delete some records from Oracle >8.1.7 using DCOracle2 module. I try the program in >python interactive environment. Once i execute the >delete statement, the program goes to infinite loop. >If i hit control C, i see this error. >################################### >TraceBack: most recent call last: > File "", line 1,in >################################## Clearly, this isn't the intended effect of the "delete" statement when issued through any DB-API module, although I could imagine situations where some kind of lock is held on the table in question and that could result in your operation blocking. However, I don't know whether that would actually happen so readily in Oracle. >I am sure i have proper connection and cursor because >i can insert data into table. My delete query looks >like this. > >cur=connection.cursor() >cur.execute("Delete from table where id=%s"%1.0), >where 1.0 is an arbitrary id number. What is going >wrong in my query? One point, which I keep mentioning to numerous people, is that you should attempt to use "parameters" or "bind variables" in your statements, rather than Python's string substitution, but I suppose you are aware of that already. > Beside i also face a strange situation, the "select >count(*) from table where colum=%s"%1.0 give me the >some values in python interactive environment as well >as in the program. However, when i check the result >using sqlplus directly, the number is different. Even >i delete all rows of that id, python still return some >values. I don't understand what is going on in here, >can somebody enlight me? > Thank you very much for your precious time. If you have an sqlplus session going on at the same time as your interactive Python session, it might well be the case that the two have different "views" of the state of the database. If you perform a delete operation in sqlplus, for example, then even if you commit that transaction, the connection open in Python will not necessarily be aware of the "new" state of the database. This is related to how transactions are managed in the DB-API and was a recent discussion topic on the Webware mailing list. What you could do is to work in sqlplus, commit your transaction, possibly quit sqlplus, and then open a connection in Python. At least, it might be clearer where the problem lies then, given that you would have reduced the number of influences on the behaviour of your code. Regards, Paul -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From paul@boddie.net Mon Sep 24 11:28:52 2001 From: paul@boddie.net (paul@boddie.net) Date: 24 Sep 2001 10:28:52 -0000 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? Message-ID: <20010924102852.2273.qmail@www3.nameplanet.com> dhalgren@bigfoot.com wrote: > >So my question, simply enough is, is there a module available, anywhere, theat >is being currently maintained and which I can use without having to go through >ODBC? I tried, in desperation, installing the mx extensions package, but that >required other packages (iODBC) which I haven't been able to track down yet. >In any case, that was a second-best option. I'm really leaning towards direct >connection without ODBC. Well, iODBC can be found at http://www.iodbc.org, but I would recommend against ODBC if you want to get started quickly and can find a suitable native adapter. Given the number of announcements about PostgreSQL modules that I've seen recently, you should be able to find at least one that does what you want. Have you tried looking in the comp.lang.python and comp.lang.python.announce archives on Google Groups (http://groups.google.com)? The Python DB-SIG pages, along with other pages on the main Python site, tend to be infrequently updated. There is also the Vaults of Parnassus - see the Python site for a link to that resource. >Any suggestions for this newbie? Is there ever going to be db support in the >standard Python distributions? I believe the main reason for not providing SQL-oriented database system support in the standard library is the potential for increasing the size of the download package significantly. Paul -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From dhalgren@bigfoot.com Mon Sep 24 21:39:06 2001 From: dhalgren@bigfoot.com (dhalgren@bigfoot.com) Date: Mon, 24 Sep 2001 15:39:06 -0500 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? In-Reply-To: <20010924102852.2273.qmail@www3.nameplanet.com> Message-ID: <3BAF539A.21268.176018B2@localhost> > Well, iODBC can be found at http://www.iodbc.org, Yeah, I found it later, but held off on using it. Like you mention below, there'd been enough native suggestions that I fortunately didn't have to go the ODBC route. > but I would > recommend against ODBC if you want to get started quickly and can find > a suitable native adapter. Given the number of announcements about > PostgreSQL modules that I've seen recently, you should be able to find > at least one that does what you want. > > Have you tried looking in the comp.lang.python and > comp.lang.python.announce archives on Google Groups > (http://groups.google.com)? The Python DB-SIG pages, along with other > pages on the main Python site, tend to be infrequently updated. T Well, if that's the way it is, I'll adapt, but my experience to date with *any* software, is you go to the official site, see what they have, etc. For Python, that meant going to the python.org, looking up thier database module section, and seeing what's available. I looked, they had the pages, they had modules listed, and I considered that to be the 'official word'. Searching the entire internet, via google, is ...well...hardly elegant, and seems scarcely reasonable. I can understand that volunteer projects tend to be a little disorganized, but being unable/unwilling to maintain one's own website....that's hardly a difficult or even time-consuming task if organized among the various projects properly...I think I just lost a little respect for the folks involved in that. > >Any suggestions for this newbie? Is there ever going to be db > >support in the standard Python distributions? > > I believe the main reason for not providing SQL-oriented database > system support in the standard library is the potential for increasing > the size of the download package significantly. Hm. The packages I downloaded didn't seem too hefty. And they could be bundled into an optional "python-db-modules.tar.gz" file, kept with the main download files, but kept separate for those who would prefer to just download the main install. I think that'd be a good solution. Of course, I'm new to all of this, so take anything that comes off my keyboard with a cup of salt. ' --Aaron ps - thanks again to everyone for helping - i've got my PostgreSQL connection up and running now, very nice, just what i was expecting from Python...I *love* this language!! From deckrider@yahoo.com Mon Sep 24 22:36:26 2001 From: deckrider@yahoo.com (David Everly) Date: Mon, 24 Sep 2001 14:36:26 -0700 (PDT) Subject: [DB-SIG] db-sig api to Microsoft ActiveX Data Objects (ADO) Message-ID: <20010924213626.73816.qmail@web13404.mail.yahoo.com> Does anyone know where I can find a db-sig api to Microsoft's ADO (ActiveX Data Objects)? ===== 1024D/6CE00097 2001-02-24 David Everly Key fingerprint = E587 30C6 167F 9F25 6869 90B9 18F2 E454 6CE0 0097 __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com From paul@boddie.net Tue Sep 25 17:42:31 2001 From: paul@boddie.net (paul@boddie.net) Date: 25 Sep 2001 16:42:31 -0000 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? Message-ID: <20010925164231.15808.qmail@www2.nameplanet.com> dhalgren@bigfoot.com wrote: > >Well, if that's the way it is, I'll adapt, but my experience to date with >*any* software, is you go to the official site, see what they have, >etc. For Python, that meant going to the python.org, looking up thier >database module section, and seeing what's available. That really should be the way, but sadly it isn't. The Python site is probably one of the least updated major open source sites, with the "News" section being particularly disappointing. >I looked, they had the pages, they had modules listed, and I >considered that to be the 'official word'. Searching the entire >internet, via google, is ...well...hardly elegant, and seems scarcely >reasonable. I can understand that volunteer projects tend to be a >little disorganized, but being unable/unwilling to maintain one's own >website....that's hardly a difficult or even time-consuming task if >organized among the various projects properly...I think I just lost a >little respect for the folks involved in that. I know that there were problems with hosting, as well as the feeling that the site wasn't maintainable enough. Indeed, they were thinking of making a Zope- based site, but I think other things got prioritised. That's a shame given that the site is the first thing most newcomers get to see, and it's not that easy to navigate for such people either. >Hm. The packages I downloaded didn't seem too hefty. And they >could be bundled into an optional "python-db-modules.tar.gz" file, >kept with the main download files, but kept separate for those who >would prefer to just download the main install. The standard, but optional database packages would need to be split up into vendor-specific packages, though. I doubt whether you want to download the Oracle, Sybase, MySQL and other modules as well as the PostgreSQL one. Paul -- Get your firstname@lastname email for FREE at http://Nameplanet.com/?su From matt@zope.com Tue Sep 25 18:54:19 2001 From: matt@zope.com (Matthew T. Kromer) Date: Tue, 25 Sep 2001 13:54:19 -0400 Subject: [DB-SIG] newbie has question about Python 2.1 --> PostgreSQL 7.1.3 : Can it be done?? References: <20010925164231.15808.qmail@www2.nameplanet.com> Message-ID: <3BB0C4CB.A4C12ED8@zope.com> paul@boddie.net wrote: > > dhalgren@bigfoot.com wrote: [...] > >Hm. The packages I downloaded didn't seem too hefty. And they > >could be bundled into an optional "python-db-modules.tar.gz" file, > >kept with the main download files, but kept separate for those who > >would prefer to just download the main install. > > The standard, but optional database packages would need to be split up into > vendor-specific packages, though. I doubt whether you want to download the > Oracle, Sybase, MySQL and other modules as well as the PostgreSQL one. Actually, to my knowledge, there was some very definate thought spent in distributing databases; the problem becomes difficult due to 1) versioning of source being different than python; 2) versioning of databases; 3) availability of freely-redistributable drivers for databases and/or adapters. I for one, can say that it is VERY difficult to try to write a sniffer that sniffs your proper Oracle location, version etc and configures itself for compilation. For windows, compilation usually isn't an option, either -- so you have to distribute binaries. Now you've got some m*n*v problem with versions exploding all over the place, and while it would be *GREAT* to have rdbms support out of the "box" in Python, it is NOT something which seems to have a clearly defined solution. Having said all of that, there does seem to be an awareness that a better resource discovery ability is needed on the python site, so you can get "common stuff." I dont know that its a highest-priority task for anyone involved, which, while dissapointing, is also understandable. From kimtitu@yahoo.com Fri Sep 28 19:03:27 2001 From: kimtitu@yahoo.com (Titu Kim) Date: Fri, 28 Sep 2001 11:03:27 -0700 (PDT) Subject: [DB-SIG] See the bind query statment Message-ID: <20010928180327.2123.qmail@web14708.mail.yahoo.com> Hi there, I have a query that is executed using cursor.execute(query, param1,param2....). How can i see the substituted query that is presented to database? I am using DCOracle2 module for db connection. Please enlight me on this issue. Any suggestion is highly appreciated. Thank you very much. Kim Titu __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com From matt@zope.com Fri Sep 28 19:08:34 2001 From: matt@zope.com (Matthew T. Kromer) Date: Fri, 28 Sep 2001 14:08:34 -0400 Subject: [DB-SIG] See the bind query statment References: <20010928180327.2123.qmail@web14708.mail.yahoo.com> Message-ID: <3BB4BCA2.3070606@zope.com> Titu Kim wrote: >Hi there, > I have a query that is executed using >cursor.execute(query, param1,param2....). How can i >see the substituted query that is presented to >database? I am using DCOracle2 module for db >connection. Please enlight me on this issue. Any >suggestion is highly appreciated. Thank you very much. > >Kim Titu > If you're using positional parameter binding with DCOracle2, you use something like cursor.execute('SELECT * FROM EMP WHERE EMPNO = :1', empno) -- so the SQL statement is untouched from what you passed in. The only time DCOracle2 constructs a statement is during stored procedure execution. >