On Sat, 17 May 2008 23:47:49 +0300, objectref wrote: > So, here the standard is DB API but PyQt uses something different. I plan > to access Sql Server databases (mostly) but it would be nice to have my > code such that it can easily be ported to some other DB in the future (I > know that I can code it such way in PyQt.) > > As I have the opinion that "standard" is a good thing, do you think that I > better use some other module that is DB-API compliant or PyQt is best to be > used in this case?
Back in 2006, Torsten Marek wrote a SQL model based on the DB-API, removing the need to use the QtSql module. The code can be found in this examples package: http://pypi.python.org/pypi/EuroPython2006_PyQt4_Examples/1.0 It was created as supporting material for a talk at EuroPython 2006: http://indico.cern.ch/contributionDisplay.py?contribId=33&sessionId=41&confId=44 The point is that the infrastructure should be flexible enough to let you use either "standard" (or convention). The code provided in the example doesn't do everything you might want, but it should be possible to extend it. David P.S. A reminder: EuroPython 2008 registration is now open and we're still accepting talk submissions. See http://www.europython.org/ for details. _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt