From phd at phd.pp.ru Wed Aug 12 12:25:08 2009 From: phd at phd.pp.ru (Oleg Broytmann) Date: Wed, 12 Aug 2009 14:25:08 +0400 Subject: [DB-SIG] SQLObject 0.11.0 Message-ID: <20090812102508.GF5602@phd.pp.ru> Hello! I'm pleased to announce version 0.11.0, the first stable release of 0.11 branch of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started with. SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite, Firebird, Sybase, MSSQL and MaxDB (also known as SAPDB). Where is SQLObject ================== Site: http://sqlobject.org Development: http://sqlobject.org/devel/ Mailing list: https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss Archives: http://news.gmane.org/gmane.comp.python.sqlobject Download: http://cheeseshop.python.org/pypi/SQLObject/0.11.0 News and changes: http://sqlobject.org/News.html What's New ========== News since 0.10 ----------------- Features & Interface ~~~~~~~~~~~~~~~~~~~~ * Dropped support for Python 2.3. The minimal version of Python for SQLObject is 2.4 now. * Dropped support for PostgreSQL 7.2. The minimal supported version of PostgreSQL is 7.3 now. * New magic attribute 'j' similar to 'q' was added that automagically does join with the other table in MultipleJoin or RelatedJoin. * SQLObject can now create and drop a database in MySQL, PostgreSQL, SQLite and Firebird/Interbase. * Added some support for schemas in PostgreSQL. * Added DecimalStringCol - similar to DecimalCol but stores data as strings to work around problems in some drivers and type affinity problem in SQLite. * Added sqlobject.include.hashcol.HashCol - a column type that automatically hashes anything going into it, and returns out an object that hashes anything being compared to itself. Basically, it's good for really simple one-way password fields, and it even supports the assignment of None to indicate no password set. By default, it uses the md5 library for hashing, but this can be changed in a HashCol definition. * RowDestroyedSignal and RowUpdatedSignal were added. Minor features ~~~~~~~~~~~~~~ * Use reversed() in manager/command.py instead of .__reversed__(). * Minor change in logging to console - logger no longer stores the output file, it gets the file from module sys every time by name; this means logging will use new sys.stdout (or stderr) in case the user changed them. * Changed the order of testing of SQLite modules - look for external PySQLite2 before sqlite3. For a more complete list, please see the news: http://sqlobject.org/News.html Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru Programmers don't die, they just GOSUB without RETURN. From mhecht2909 at instant-mail.de Fri Aug 21 11:36:26 2009 From: mhecht2909 at instant-mail.de (M. Hecht) Date: Fri, 21 Aug 2009 02:36:26 -0700 (PDT) Subject: [DB-SIG] How to connect to informix DB in an easy way Message-ID: <25076131.post@talk.nabble.com> Hello, I'm really wondering why it is so difficult to connect to an Informix DB (I didn't find any easy example). In Java I only need this connection string: jdbc:informix-sqli://address:port/dbName:informixserver=dbServerName For MySQL it is also quite easy: db = MySQLdb.connect(host='hostname', user='username', passwd='password', db='dbName') So why I have to configure environment variables or registry keys to connect to an Informix DB with Python?? Is there any comparable approach doing this in one script whithout additional configuration? -- View this message in context: http://www.nabble.com/How-to-connect-to-informix-DB-in-an-easy-way-tp25076131p25076131.html Sent from the Python - db-sig mailing list archive at Nabble.com. From carsten.haese at gmail.com Fri Aug 21 14:15:34 2009 From: carsten.haese at gmail.com (Carsten Haese) Date: Fri, 21 Aug 2009 08:15:34 -0400 Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <25076131.post@talk.nabble.com> References: <25076131.post@talk.nabble.com> Message-ID: <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> On Fri, Aug 21, 2009 at 5:36 AM, M. Hecht wrote: > So why I have to configure environment variables or registry keys to > connect > to an Informix DB > with Python?? You have to configure environment variables or registry keys to connect to Informix with ANY LANGUAGE, not just in Python, because that's how the Informix client library is set up. > Is there any comparable approach doing this in one script whithout > additional configuration? You could try to set up the necessary environment directly in your code. Good luck, Carsten Haese http://informixdb.sourceforge.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Fri Aug 21 17:37:44 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Fri, 21 Aug 2009 09:37:44 -0600 Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> Message-ID: I assume (since you mention registry keys) that you are using some version of Windows. I have not tested this, but it should work: 1) install pywin32, which contains adodbapi. see: http://sourceforge.net/projects/pywin32 (or, if you are using IronPython, http://sourceforge.net/projects/adodbapi 2) set up OLE DB drivers for Informix on your workstation(s). I found this reference on Google: http://www.datadirect.com/support/getting_started/quick_start/ado_informix/index.ssp 3) use a connection string like: adodbapi.connect("Provider=Ifxoledbc;Data Source=dbName at serverName;User ID=myUsername;Password=myPassword;") see: http://connectionstrings.com/informix#p47 -- Good Luck in your effort. Vernon Cole On Fri, Aug 21, 2009 at 6:15 AM, Carsten Haese wrote: > On Fri, Aug 21, 2009 at 5:36 AM, M. Hecht wrote: > >> So why I have to configure environment variables or registry keys to >> connect >> to an Informix DB >> with Python?? > > > You have to configure environment variables or registry keys to connect to > Informix with ANY LANGUAGE, not just in Python, because that's how the > Informix client library is set up. > > >> Is there any comparable approach doing this in one script whithout >> additional configuration? > > > You could try to set up the necessary environment directly in your code. > > Good luck, > > Carsten Haese > http://informixdb.sourceforge.net > > > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhecht2909 at instant-mail.de Fri Aug 21 15:34:06 2009 From: mhecht2909 at instant-mail.de (M. Hecht) Date: Fri, 21 Aug 2009 06:34:06 -0700 (PDT) Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> Message-ID: <25079891.post@talk.nabble.com> Hello, > You have to configure environment variables or registry keys to connect to > Informix with ANY LANGUAGE, not just in Python, because that's how the > Informix client library is set up. as you can see from the connection string jdbc:informix-sqli://address:port/dbName:informixserver=dbServerName it is NOT necessary to do this in JAVA! Neither for Informix nor for any other DBMS since the connection string is the only necessary information. ;-) But thank you for the link to the documentation. Maybe I can make the setup from source code, what would be totally sufficient. -- View this message in context: http://www.nabble.com/How-to-connect-to-informix-DB-in-an-easy-way-tp25076131p25079891.html Sent from the Python - db-sig mailing list archive at Nabble.com. From mhecht2909 at instant-mail.de Fri Aug 21 15:52:40 2009 From: mhecht2909 at instant-mail.de (M. Hecht) Date: Fri, 21 Aug 2009 06:52:40 -0700 (PDT) Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> Message-ID: <25080233.post@talk.nabble.com> Hmmm .... meanwhile I tried to find something in the proposed documentation but failed. What I have is a Network Address, Port, DB-Server-Name and DB-Name since on the computer are running several databases. This is what I tried to describe with the JAVA connection string: jdbc:informix-sqli://address:port/dbName:informixserver=dbServerName There is NOTHING appropriate in the proposed documentation. Only this here: ... 'database at server' ... so database is clearly the database and server is the network address. But where can I enter the port and the dbServerName??? I tried something like this connect('dbServerName at ipAddress:Port' ... connect('dbName at ipAddress:Port' ... but with both I get the error message ... The INFORMIXSERVER value is not listed in the sqlhosts file or the Registry ... Do you have any suggestion? -- View this message in context: http://www.nabble.com/How-to-connect-to-informix-DB-in-an-easy-way-tp25076131p25080233.html Sent from the Python - db-sig mailing list archive at Nabble.com. From carsten.haese at gmail.com Sat Aug 22 07:06:08 2009 From: carsten.haese at gmail.com (Carsten Haese) Date: Sat, 22 Aug 2009 01:06:08 -0400 Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <25080233.post@talk.nabble.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> <25080233.post@talk.nabble.com> Message-ID: <5fbcfcff0908212206k71df4ac5sba5ed739f966c605@mail.gmail.com> On Fri, Aug 21, 2009 at 9:52 AM, M. Hecht wrote: > > Hmmm .... > > meanwhile I tried to find something in the proposed documentation but > failed. > > What I have is a Network Address, Port, DB-Server-Name and DB-Name since on > the computer are > running several databases. > > This is what I tried to describe with the JAVA connection string: > > jdbc:informix-sqli://address:port/dbName:informixserver=dbServerName > The Python module is based on ESQL/C, which uses an entirely different philosophy than JDBC. You can't expect to be able to translate a JDBC connection string into an ESQL/C CONNECT statement. There is NOTHING appropriate in the proposed documentation. Only this here: > > ... 'database at server' ... > > so database is clearly the database and server is the network address. But > where can I enter the port and the dbServerName??? > > I tried something like this > > connect('dbServerName at ipAddress:Port' ... > connect('dbName at ipAddress:Port' ... > > but with both I get the error message > > ... The INFORMIXSERVER value is not listed in the sqlhosts file or the > Registry ... > > Do you have any suggestion? ESQL/C applications don't connect directly to IP-Address/Port combinations. They connect to abstractly defined servers that are defined in the sqlhosts file. Information about how to write an sqlhosts file can be found on Google by searching for "Informix sqlhosts file." -Carsten -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhecht2909 at instant-mail.de Mon Aug 24 10:00:46 2009 From: mhecht2909 at instant-mail.de (M. Hecht) Date: Mon, 24 Aug 2009 01:00:46 -0700 (PDT) Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <5fbcfcff0908212206k71df4ac5sba5ed739f966c605@mail.gmail.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> <25080233.post@talk.nabble.com> <5fbcfcff0908212206k71df4ac5sba5ed739f966c605@mail.gmail.com> Message-ID: <25112024.post@talk.nabble.com> Hi, finally I got it working, but have some questions left. The minimum configuration I need is to install INFORMIX and then to have the following seetings: set INFORMIXSERVER=myPreferredInformixServerName set INFORMIXDIR=c:\Programme\Informix\Client-SDK and this registry key: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\myPreferredInformixServerName] "HOST"="theHostNameOfTheDatabase" "SERVICE"="the service from WINDOWS/SYSTEM32/DRIVERS/ETC" "PROTOCOL"="onsoctcp" What is not really clear to me is: Do I use now an Windows-ODBC-Connection instead of a direct connection? -- View this message in context: http://www.nabble.com/How-to-connect-to-informix-DB-in-an-easy-way-tp25076131p25112024.html Sent from the Python - db-sig mailing list archive at Nabble.com. From jimmy.briggs at gmail.com Tue Aug 25 02:04:04 2009 From: jimmy.briggs at gmail.com (James Briggs) Date: Tue, 25 Aug 2009 10:04:04 +1000 Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <25112024.post@talk.nabble.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> <25080233.post@talk.nabble.com> <5fbcfcff0908212206k71df4ac5sba5ed739f966c605@mail.gmail.com> <25112024.post@talk.nabble.com> Message-ID: <23b1b67f0908241704of0743a4wf0a180328ae7cce9@mail.gmail.com> I have had success in connecting to almost any database using the pyodbc module: http://code.google.com/p/pyodbc/ The difficult part is finding the correct connection string - see http://www.connectionstrings.com/informix I haven't connected to an Informix database myself, but have connected to everything from Access, SQL Server to DB2 on Series i. For some of these an ODBC driver will eed to be installed on your PC (unless one is already provided by Microsoft). The driver name can be found in the ODBC administration part of the Windows control panel when you add a new ODBC DSN. For Example: Access_connect-str = 'Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=me;Pwd=pass' MSSQL_connect_str = 'DRIVER={SQL Server};SERVER=localhost;DATABASE=testdb;UID=me;PWD=pass' iSeries_connect_str = 'DRIVER={iSeries access ODBC Driver};SYSTEM=10.3.36.123;UID=me;PWD=pass' For Informix using microsoft's .net driver - connect_str='Provider=Ifxoledbc;Data Source=dbName at serverName;User ID= myUsername;Password=myPassword;' Using a connection string such as one of the ones above a connection is created as follows db=pyodbc.connect(connect_str) If you can define an ODBC data source (through windows ODBC administration tool) a connection can be created with: db=pyodbc.connect('DSN=%s;UID=%s;PWD=%s' % (myDSN,myUsername,myPassword)) Goodluck. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carsten.haese at gmail.com Tue Aug 25 02:44:29 2009 From: carsten.haese at gmail.com (Carsten Haese) Date: Mon, 24 Aug 2009 20:44:29 -0400 Subject: [DB-SIG] How to connect to informix DB in an easy way In-Reply-To: <25112024.post@talk.nabble.com> References: <25076131.post@talk.nabble.com> <5fbcfcff0908210515o1b7a1670v96447eab2f659b07@mail.gmail.com> <25080233.post@talk.nabble.com> <5fbcfcff0908212206k71df4ac5sba5ed739f966c605@mail.gmail.com> <25112024.post@talk.nabble.com> Message-ID: <5fbcfcff0908241744r15cf543ekfd5d28a1020ccf5@mail.gmail.com> On Mon, Aug 24, 2009 at 4:00 AM, M. Hecht wrote: > > Hi, > > finally I got it working, Congratulations! > but have some questions left. > > The minimum configuration I need is to install INFORMIX and then to have > the > following seetings: > > set INFORMIXSERVER=myPreferredInformixServerName > set INFORMIXDIR=c:\Programme\Informix\Client-SDK > > and this registry key: > > Windows Registry Editor Version 5.00 > > > [HKEY_LOCAL_MACHINE\SOFTWARE\Informix\SqlHosts\myPreferredInformixServerName] > "HOST"="theHostNameOfTheDatabase" > "SERVICE"="the service from WINDOWS/SYSTEM32/DRIVERS/ETC" > "PROTOCOL"="onsoctcp" > > What is not really clear to me is: Do I use now an Windows-ODBC-Connection > instead of a direct connection That sure looks to me like you've configured a native (i.e. direct) Informix connection. -Carsten -------------- next part -------------- An HTML attachment was scrubbed... URL: From normanbauer at gmail.com Wed Aug 26 19:20:21 2009 From: normanbauer at gmail.com (Norman Bauer) Date: Wed, 26 Aug 2009 13:20:21 -0400 Subject: [DB-SIG] Multivalue database access - non-SQL Message-ID: Hello, I am beginning to dive into developing a module connecting to an IBM UniVerse database. I'll first start by saying that this is the largest undertaking I have ever had and so far the experience has been fun, yet frustrating at times... I know wahhhh.... Before I get into the meat of it, I would really appreciate some general pointers in developing to the DB API, pitfalls and the likes. And also if anyone has worked on or developed one of the non-relational database modules in the past your input would be extremely valuable. Oh and of course if there is anyone who may want to collaborate on this project, I would welcome your contributions. Best regards, Norm From lists at jwp.name Wed Aug 26 21:07:14 2009 From: lists at jwp.name (James Pye) Date: Wed, 26 Aug 2009 12:07:14 -0700 Subject: [DB-SIG] Multivalue database access - non-SQL In-Reply-To: References: Message-ID: <4CC7E0D7-60FE-46CA-AF52-1AD627430E5B@jwp.name> On Aug 26, 2009, at 10:20 AM, Norman Bauer wrote: > Before I get into the meat of it, I would really appreciate some > general pointers in developing to the DB API, pitfalls and the likes. DB-API 2.0 spec is pretty much all there is, AFAIK. It's pretty straightforward... There's also some unittests (for db-api 2) floating around that assumes an SQL-type database. However, I imagine it would be easy to modify to accommodate for your target. I've never heard of UniVerse database, but I imagine that you'll probably want to implement a model that is consistent with the resource that you are attempting to interface with. Then, layer a DB- API interface on top of that. From paul at boddie.org.uk Wed Aug 26 22:23:04 2009 From: paul at boddie.org.uk (Paul Boddie) Date: Wed, 26 Aug 2009 22:23:04 +0200 Subject: [DB-SIG] Multivalue database access - non-SQL In-Reply-To: References: Message-ID: <200908262223.04655.paul@boddie.org.uk> On Wednesday 26 August 2009 19:20:21 Norman Bauer wrote: > > I am beginning to dive into developing a module connecting to an IBM > UniVerse database. I'll first start by saying that this is the largest > undertaking I have ever had and so far the experience has been fun, > yet frustrating at times... I know wahhhh.... Didn't IBM get round to making an ODBC connector for UniVerse or continue the plans to merge UniVerse with UniData (which did have such a connector, as I recall)? UniData seemed very archaic when I had to do work against it, but there was some kind of SQL/ODBC support, even though the documentation was mediocre (again, as I recall). Paul From mal at egenix.com Wed Aug 26 23:09:12 2009 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 26 Aug 2009 23:09:12 +0200 Subject: [DB-SIG] Multivalue database access - non-SQL In-Reply-To: References: Message-ID: <4A95A478.5080009@egenix.com> Norman Bauer wrote: > Hello, > > I am beginning to dive into developing a module connecting to an IBM > UniVerse database. I'll first start by saying that this is the largest > undertaking I have ever had and so far the experience has been fun, > yet frustrating at times... I know wahhhh.... > > Before I get into the meat of it, I would really appreciate some > general pointers in developing to the DB API, pitfalls and the likes. > And also if anyone has worked on or developed one of the > non-relational database modules in the past your input would be > extremely valuable. > > Oh and of course if there is anyone who may want to collaborate on > this project, I would welcome your contributions. Unless you have some specific need that requires writing a native driver for UniVerse, I'd suggest to first have a look at the UniVerse ODBC driver: http://publib.boulder.ibm.com/epubs/pdf/25119340.pdf The driver conforms to ODBC 2.0, so should work well with mxODBC which supports drivers having ODBC conformance levels 2.0 - 3.5: http://www.egenix.com/products/python/mxODBC/ Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 26 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From vernondcole at gmail.com Fri Aug 28 00:06:38 2009 From: vernondcole at gmail.com (Vernon Cole) Date: Thu, 27 Aug 2009 16:06:38 -0600 Subject: [DB-SIG] Multivalue database access - non-SQL In-Reply-To: <200908262223.04655.paul@boddie.org.uk> References: <200908262223.04655.paul@boddie.org.uk> Message-ID: Norman: You did not specify what platform you will be implementing this on. I think everyone assumes Windows. A quick google search leads me to: http://gigamegatech.com/2008/09/16/u2-and-adonet-relatively-relational/ which mentions that IBM has done some recent work with an ADO.NET driver. dotNET things can be conveniently run from IronPython. The fepy project has several simple .NET based SQL modules which more-or-less follow the db API 2.0 standard and are written in pure IronPython. There is also the adodbapi module which could be used as a Python code example. It fully implements the API, but I have not yet gotten around to forking a version which is specific to ADO.NET -- the existing code uses the COM interface to ADO. Microsoft fixed the last bug in the IronPython COM interface yesterday, which is what I have been waiting for before starting on another update. Some collaboration might be possible... I have had good success talking to an AS400 DB2 database using adodbapi. -- Vernon Cole On Wed, Aug 26, 2009 at 2:23 PM, Paul Boddie wrote: > On Wednesday 26 August 2009 19:20:21 Norman Bauer wrote: > > > > I am beginning to dive into developing a module connecting to an IBM > > UniVerse database. I'll first start by saying that this is the largest > > undertaking I have ever had and so far the experience has been fun, > > yet frustrating at times... I know wahhhh.... > > Didn't IBM get round to making an ODBC connector for UniVerse or continue > the > plans to merge UniVerse with UniData (which did have such a connector, as I > recall)? UniData seemed very archaic when I had to do work against it, but > there was some kind of SQL/ODBC support, even though the documentation was > mediocre (again, as I recall). > > Paul > _______________________________________________ > DB-SIG maillist - DB-SIG at python.org > http://mail.python.org/mailman/listinfo/db-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: