From wouter at 2at.nl Tue Jun 3 03:49:58 2008 From: wouter at 2at.nl (Wouter van Atteveldt) Date: Tue Jun 3 02:57:18 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string Message-ID: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> Dear list, I am evaluating mx.odbc for connecting to a MS SQL server from my Linux machine using freetds 0.82. I can connect and query using isql without problem, but I get a segmentation fault if I fetch using the mx.odbc interface. wva@amcat:~/tmp$ isql -v AmcatDB +---------------------------------------+ | Connected! [...] +---------------------------------------+ SQL> select top 1 projectid, name from projects [...] | 1 | test [...] SQLRowCount returns 1 1 rows fetched wva@amcat:~/tmp$ python testodbc.py connected to Microsoft SQL Server 08.00.2039 Executed, fetching... [(1,)] Executed, fetching... Segmentation fault wva@amcat:~/tmp$ cat testodbc.py import mx.ODBC db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") print "connected to %s %s" % (db.dbms_name, db.dbms_version) c = db.cursor() c.executedirect("select top 1 projectid from projects") print "Executed, fetching..." print c.fetchall() c.executedirect("select top 1 projectid, name from projects") print "Executed, fetching..." print c.fetchall()wva@amcat:~/tmp$ uname -a Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 GNU/Linux wva@amcat:~/tmp$ python -c "import sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" UCS4 As you can see, it returns the MS SQL version number so it has some contact with the remote db. I installed using egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I think should be OK as x86_64 == AMD64 (right?). projected is int, name is a varchar(255) column, and the table should have a couple hundred entries at most. The relevant etc files: wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf [amcatdb] host = localhost port = 1433 tds version = 8.0 wva@amcat:~/tmp$ cat /etc/odbc.ini [AmcatDB] Driver = FreeTDS Description = amcatdb MS SQL Database Trace = No Servername = amcatdb Database = anoko wva@amcat:~/tmp$ cat /etc/odbcinst.ini [FreeTDS] Description = v0.63 with protocol v8.0 Driver = /usr/local/freetds/lib/libtdsodbc.so UsageCount = 1 Note that I am using an SSH tunnel to connect to the sql server, hence the localhost. This does not give trouble using either tsql, isql, or python-sybase (on a previous install), so I am not expecting this to be the cause of the problem. Any help greatly appreciated! -- Wouter From mal at egenix.com Tue Jun 3 12:20:38 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 3 11:21:04 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string In-Reply-To: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> References: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> Message-ID: <48450CE6.3080206@egenix.com> On 2008-06-03 02:49, Wouter van Atteveldt wrote: > Dear list, > > I am evaluating mx.odbc for connecting to a MS SQL server from my Linux machine using freetds 0.82. I can connect and query using isql without problem, but I get a segmentation fault if I fetch using the mx.odbc interface. isql uses a different, all-strings based access method to the ODBC driver, so it can really only be used to verify that a connection works, not much more. mxODBC always tries to use the best possible access method to avoid frequent copying and conversion of the data. > wva@amcat:~/tmp$ isql -v AmcatDB > +---------------------------------------+ > | Connected! > [...] > +---------------------------------------+ > SQL> select top 1 projectid, name from projects > [...] > | 1 | test > [...] > SQLRowCount returns 1 > 1 rows fetched > > wva@amcat:~/tmp$ python testodbc.py > connected to Microsoft SQL Server 08.00.2039 > Executed, fetching... > [(1,)] > Executed, fetching... > Segmentation fault Could you send us the core dump of this segfault ? It is most likely a problem in the new FreeTDS ODBC driver. FreeTDS 0.63 works just fine on x64 machines. It would be great if you could also provide the table definition and example data that allows us reproducing the error on our servers. > wva@amcat:~/tmp$ cat testodbc.py > import mx.ODBC > db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") > print "connected to %s %s" % (db.dbms_name, db.dbms_version) > c = db.cursor() > c.executedirect("select top 1 projectid from projects") > print "Executed, fetching..." > print c.fetchall() > c.executedirect("select top 1 projectid, name from projects") > print "Executed, fetching..." > > print c.fetchall()wva@amcat:~/tmp$ uname -a > Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 > GNU/Linux > wva@amcat:~/tmp$ python -c "import sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" > UCS4 > > As you can see, it returns the MS SQL version number so it has some contact with the remote db. I installed using egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I think should be OK as x86_64 == AMD64 (right?). projected is int, name is a varchar(255) column, and the table should have a couple hundred entries at most. > > The relevant etc files: > > wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf > [amcatdb] > host = localhost > port = 1433 > tds version = 8.0 > wva@amcat:~/tmp$ cat /etc/odbc.ini > [AmcatDB] > Driver = FreeTDS > Description = amcatdb MS SQL Database > Trace = No > Servername = amcatdb > Database = anoko > wva@amcat:~/tmp$ cat /etc/odbcinst.ini > [FreeTDS] > Description = v0.63 with protocol v8.0 > Driver = /usr/local/freetds/lib/libtdsodbc.so > UsageCount = 1 > > Note that I am using an SSH tunnel to connect to the sql server, hence the localhost. This does not give trouble using either tsql, isql, or python-sybase (on a previous install), so I am not expecting this to be the cause of the problem. > > Any help greatly appreciated! Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 03 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 33 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mal at egenix.com Tue Jun 3 12:35:46 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 3 11:36:05 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string In-Reply-To: <48450CE6.3080206@egenix.com> References: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> <48450CE6.3080206@egenix.com> Message-ID: <48451072.2010903@egenix.com> On 2008-06-03 11:20, M.-A. Lemburg wrote: > On 2008-06-03 02:49, Wouter van Atteveldt wrote: >> Dear list, >> >> I am evaluating mx.odbc for connecting to a MS SQL server from my >> Linux machine using freetds 0.82. I can connect and query using isql >> without problem, but I get a segmentation fault if I fetch using the >> mx.odbc interface. > > isql uses a different, all-strings based access method to the ODBC > driver, so it can really only be used to verify that a connection > works, not much more. > > mxODBC always tries to use the best possible access method to > avoid frequent copying and conversion of the data. > >> wva@amcat:~/tmp$ isql -v AmcatDB >> +---------------------------------------+ >> | Connected! >> [...] >> +---------------------------------------+ >> SQL> select top 1 projectid, name from projects >> [...] >> | 1 | test >> [...] >> SQLRowCount returns 1 >> 1 rows fetched >> >> wva@amcat:~/tmp$ python testodbc.py >> connected to Microsoft SQL Server 08.00.2039 >> Executed, fetching... >> [(1,)] >> Executed, fetching... >> Segmentation fault > > Could you send us the core dump of this segfault ? It is most likely > a problem in the new FreeTDS ODBC driver. FreeTDS 0.63 works just fine > on x64 machines. ... and so does version 0.64. We're testing 0.82 now. Did you compile FreeTDS against unixODBC or iODBC ? > It would be great if you could also provide the table > definition and example data that allows us reproducing the > error on our servers. > >> wva@amcat:~/tmp$ cat testodbc.py >> import mx.ODBC >> db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") >> print "connected to %s %s" % (db.dbms_name, db.dbms_version) >> c = db.cursor() >> c.executedirect("select top 1 projectid from projects") >> print "Executed, fetching..." >> print c.fetchall() >> c.executedirect("select top 1 projectid, name from projects") >> print "Executed, fetching..." >> >> print c.fetchall()wva@amcat:~/tmp$ uname -a >> Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 >> GNU/Linux >> wva@amcat:~/tmp$ python -c "import >> sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" >> UCS4 >> >> As you can see, it returns the MS SQL version number so it has some >> contact with the remote db. I installed using >> egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I >> think should be OK as x86_64 == AMD64 (right?). projected is int, name >> is a varchar(255) column, and the table should have a couple hundred >> entries at most. >> >> The relevant etc files: >> >> wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf >> [amcatdb] >> host = localhost >> port = 1433 >> tds version = 8.0 >> wva@amcat:~/tmp$ cat /etc/odbc.ini >> [AmcatDB] >> Driver = FreeTDS >> Description = amcatdb MS SQL Database >> Trace = No >> Servername = amcatdb >> Database = anoko >> wva@amcat:~/tmp$ cat /etc/odbcinst.ini >> [FreeTDS] >> Description = v0.63 with protocol v8.0 >> Driver = /usr/local/freetds/lib/libtdsodbc.so >> UsageCount = 1 >> >> Note that I am using an SSH tunnel to connect to the sql server, hence >> the localhost. This does not give trouble using either tsql, isql, or >> python-sybase (on a previous install), so I am not expecting this to >> be the cause of the problem. >> >> Any help greatly appreciated! > > Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 03 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 33 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mal at egenix.com Tue Jun 3 12:56:24 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 3 11:56:43 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string In-Reply-To: <48451072.2010903@egenix.com> References: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> <48450CE6.3080206@egenix.com> <48451072.2010903@egenix.com> Message-ID: <48451548.3050005@egenix.com> We ran our test suite using our release candidate 2 of mxODBC 3.0.2 against FreeTDS 0.82 with unixODBC and iODBC, with SQL Server 2000 and SQL Server 2005, but could not reproduce the problem you are seeing. We've uploaded the RC2 to our server. Could you try with that version ? http://downloads.egenix.com/python/egenix-mxodbc-3.0.2_rc2.linux-x86_64-py2.5_ucs4.prebuilt.zip Thanks, On 2008-06-03 11:35, M.-A. Lemburg wrote: > On 2008-06-03 11:20, M.-A. Lemburg wrote: >> On 2008-06-03 02:49, Wouter van Atteveldt wrote: >>> Dear list, >>> >>> I am evaluating mx.odbc for connecting to a MS SQL server from my >>> Linux machine using freetds 0.82. I can connect and query using isql >>> without problem, but I get a segmentation fault if I fetch using the >>> mx.odbc interface. >> >> isql uses a different, all-strings based access method to the ODBC >> driver, so it can really only be used to verify that a connection >> works, not much more. >> >> mxODBC always tries to use the best possible access method to >> avoid frequent copying and conversion of the data. >> >>> wva@amcat:~/tmp$ isql -v AmcatDB >>> +---------------------------------------+ >>> | Connected! >>> [...] >>> +---------------------------------------+ >>> SQL> select top 1 projectid, name from projects >>> [...] >>> | 1 | test >>> [...] >>> SQLRowCount returns 1 >>> 1 rows fetched >>> >>> wva@amcat:~/tmp$ python testodbc.py >>> connected to Microsoft SQL Server 08.00.2039 >>> Executed, fetching... >>> [(1,)] >>> Executed, fetching... >>> Segmentation fault >> >> Could you send us the core dump of this segfault ? It is most likely >> a problem in the new FreeTDS ODBC driver. FreeTDS 0.63 works just fine >> on x64 machines. > > ... and so does version 0.64. We're testing 0.82 now. Did you compile > FreeTDS against unixODBC or iODBC ? > >> It would be great if you could also provide the table >> definition and example data that allows us reproducing the >> error on our servers. >> >>> wva@amcat:~/tmp$ cat testodbc.py >>> import mx.ODBC >>> db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") >>> print "connected to %s %s" % (db.dbms_name, db.dbms_version) >>> c = db.cursor() >>> c.executedirect("select top 1 projectid from projects") >>> print "Executed, fetching..." >>> print c.fetchall() >>> c.executedirect("select top 1 projectid, name from projects") >>> print "Executed, fetching..." >>> >>> print c.fetchall()wva@amcat:~/tmp$ uname -a >>> Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 >>> GNU/Linux >>> wva@amcat:~/tmp$ python -c "import >>> sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" >>> UCS4 >>> >>> As you can see, it returns the MS SQL version number so it has some >>> contact with the remote db. I installed using >>> egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I >>> think should be OK as x86_64 == AMD64 (right?). projected is int, >>> name is a varchar(255) column, and the table should have a couple >>> hundred entries at most. >>> >>> The relevant etc files: >>> >>> wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf >>> [amcatdb] >>> host = localhost >>> port = 1433 >>> tds version = 8.0 >>> wva@amcat:~/tmp$ cat /etc/odbc.ini >>> [AmcatDB] >>> Driver = FreeTDS >>> Description = amcatdb MS SQL Database >>> Trace = No >>> Servername = amcatdb >>> Database = anoko >>> wva@amcat:~/tmp$ cat /etc/odbcinst.ini >>> [FreeTDS] >>> Description = v0.63 with protocol v8.0 >>> Driver = /usr/local/freetds/lib/libtdsodbc.so >>> UsageCount = 1 >>> >>> Note that I am using an SSH tunnel to connect to the sql server, >>> hence the localhost. This does not give trouble using either tsql, >>> isql, or python-sybase (on a previous install), so I am not expecting >>> this to be the cause of the problem. >>> >>> Any help greatly appreciated! >> >> Thanks, > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 03 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 33 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mal at egenix.com Tue Jun 3 18:43:19 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 3 17:43:51 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string In-Reply-To: <48451548.3050005@egenix.com> References: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> <48450CE6.3080206@egenix.com> <48451072.2010903@egenix.com> <48451548.3050005@egenix.com> Message-ID: <48456697.7060709@egenix.com> For the other list members and the archives ... After some private discussion, it turned out that using iODBC instead of unixODBC solved the problem. However, we were not able to reproduce the problem on our machines, so in case you run into similar problems, please let us know. FWIW, the only difference between our setup and Wouter's was the version of unixODBC being used - they had 2.2.11 installed, we compile mxODBC against the more recent 2.2.12. Note that when using FreeTDS, it is often better to try using iODBC as well. Our internal tests often show a much better performance of the FreeTDS driver with iODBC than unixODBC, with much better being up to 2-3x faster depending on the usage pattern, so it's well worth a try. Thanks. On 2008-06-03 11:56, M.-A. Lemburg wrote: > We ran our test suite using our release candidate 2 of mxODBC 3.0.2 > against FreeTDS 0.82 with unixODBC and iODBC, with SQL Server 2000 and > SQL Server 2005, but could not reproduce the problem you are seeing. > > We've uploaded the RC2 to our server. Could you try with that > version ? > > http://downloads.egenix.com/python/egenix-mxodbc-3.0.2_rc2.linux-x86_64-py2.5_ucs4.prebuilt.zip > > > Thanks, > > On 2008-06-03 11:35, M.-A. Lemburg wrote: >> On 2008-06-03 11:20, M.-A. Lemburg wrote: >>> On 2008-06-03 02:49, Wouter van Atteveldt wrote: >>>> Dear list, >>>> >>>> I am evaluating mx.odbc for connecting to a MS SQL server from my >>>> Linux machine using freetds 0.82. I can connect and query using isql >>>> without problem, but I get a segmentation fault if I fetch using the >>>> mx.odbc interface. >>> >>> isql uses a different, all-strings based access method to the ODBC >>> driver, so it can really only be used to verify that a connection >>> works, not much more. >>> >>> mxODBC always tries to use the best possible access method to >>> avoid frequent copying and conversion of the data. >>> >>>> wva@amcat:~/tmp$ isql -v AmcatDB >>>> +---------------------------------------+ >>>> | Connected! >>>> [...] >>>> +---------------------------------------+ >>>> SQL> select top 1 projectid, name from projects >>>> [...] >>>> | 1 | test >>>> [...] >>>> SQLRowCount returns 1 >>>> 1 rows fetched >>>> >>>> wva@amcat:~/tmp$ python testodbc.py >>>> connected to Microsoft SQL Server 08.00.2039 >>>> Executed, fetching... >>>> [(1,)] >>>> Executed, fetching... >>>> Segmentation fault >>> >>> Could you send us the core dump of this segfault ? It is most likely >>> a problem in the new FreeTDS ODBC driver. FreeTDS 0.63 works just fine >>> on x64 machines. >> >> ... and so does version 0.64. We're testing 0.82 now. Did you compile >> FreeTDS against unixODBC or iODBC ? >> >>> It would be great if you could also provide the table >>> definition and example data that allows us reproducing the >>> error on our servers. >>> >>>> wva@amcat:~/tmp$ cat testodbc.py >>>> import mx.ODBC >>>> db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") >>>> print "connected to %s %s" % (db.dbms_name, db.dbms_version) >>>> c = db.cursor() >>>> c.executedirect("select top 1 projectid from projects") >>>> print "Executed, fetching..." >>>> print c.fetchall() >>>> c.executedirect("select top 1 projectid, name from projects") >>>> print "Executed, fetching..." >>>> >>>> print c.fetchall()wva@amcat:~/tmp$ uname -a >>>> Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 >>>> GNU/Linux >>>> wva@amcat:~/tmp$ python -c "import >>>> sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" >>>> UCS4 >>>> >>>> As you can see, it returns the MS SQL version number so it has some >>>> contact with the remote db. I installed using >>>> egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I >>>> think should be OK as x86_64 == AMD64 (right?). projected is int, >>>> name is a varchar(255) column, and the table should have a couple >>>> hundred entries at most. >>>> >>>> The relevant etc files: >>>> >>>> wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf >>>> [amcatdb] >>>> host = localhost >>>> port = 1433 >>>> tds version = 8.0 >>>> wva@amcat:~/tmp$ cat /etc/odbc.ini >>>> [AmcatDB] >>>> Driver = FreeTDS >>>> Description = amcatdb MS SQL Database >>>> Trace = No >>>> Servername = amcatdb >>>> Database = anoko >>>> wva@amcat:~/tmp$ cat /etc/odbcinst.ini >>>> [FreeTDS] >>>> Description = v0.63 with protocol v8.0 >>>> Driver = /usr/local/freetds/lib/libtdsodbc.so >>>> UsageCount = 1 >>>> >>>> Note that I am using an SSH tunnel to connect to the sql server, >>>> hence the localhost. This does not give trouble using either tsql, >>>> isql, or python-sybase (on a previous install), so I am not >>>> expecting this to be the cause of the problem. >>>> >>>> Any help greatly appreciated! >>> >>> Thanks, >> > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 03 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 33 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mal at egenix.com Tue Jun 3 19:20:26 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 3 18:20:51 2008 Subject: [egenix-users] mx.odbc segmentation fault on fetching string In-Reply-To: <48456697.7060709@egenix.com> References: <0C7B024A61D3FE4AAAE0872560789A4C5C06062C8F@aristotelis.2at.local> <48450CE6.3080206@egenix.com> <48451072.2010903@egenix.com> <48451548.3050005@egenix.com> <48456697.7060709@egenix.com> Message-ID: <48456F4A.3000301@egenix.com> On 2008-06-03 17:43, M.-A. Lemburg wrote: > For the other list members and the archives ... > > After some private discussion, it turned out that using iODBC instead > of unixODBC solved the problem. > > However, we were not able to reproduce the problem on our machines, so > in case you run into similar problems, please let us know. > > FWIW, the only difference between our setup and Wouter's was the version > of unixODBC being used - they had 2.2.11 installed, we compile mxODBC > against the more recent 2.2.12. FWIW: We tried 2.2.11 as well and could still not reproduce the problem. Perhaps Debian builds unixODBC using the "REAL 64bit" option that unixODBC provides. This would lead to a segfault when used with the mx.ODBC.unixODBC package we provide, since in "REAL 64bit" mode, unixODBC doesn't follow the MS ODBC standard. It uses the native 64-bit support and bit lengths on Linux instead. > Note that when using FreeTDS, it is often better to try using iODBC > as well. Our internal tests often show a much better performance of the > FreeTDS driver with iODBC than unixODBC, with much better being up to > 2-3x faster depending on the usage pattern, so it's well worth a try. > > Thanks. > > On 2008-06-03 11:56, M.-A. Lemburg wrote: >> We ran our test suite using our release candidate 2 of mxODBC 3.0.2 >> against FreeTDS 0.82 with unixODBC and iODBC, with SQL Server 2000 and >> SQL Server 2005, but could not reproduce the problem you are seeing. >> >> We've uploaded the RC2 to our server. Could you try with that >> version ? >> >> http://downloads.egenix.com/python/egenix-mxodbc-3.0.2_rc2.linux-x86_64-py2.5_ucs4.prebuilt.zip >> >> >> Thanks, >> >> On 2008-06-03 11:35, M.-A. Lemburg wrote: >>> On 2008-06-03 11:20, M.-A. Lemburg wrote: >>>> On 2008-06-03 02:49, Wouter van Atteveldt wrote: >>>>> Dear list, >>>>> >>>>> I am evaluating mx.odbc for connecting to a MS SQL server from my >>>>> Linux machine using freetds 0.82. I can connect and query using >>>>> isql without problem, but I get a segmentation fault if I fetch >>>>> using the mx.odbc interface. >>>> >>>> isql uses a different, all-strings based access method to the ODBC >>>> driver, so it can really only be used to verify that a connection >>>> works, not much more. >>>> >>>> mxODBC always tries to use the best possible access method to >>>> avoid frequent copying and conversion of the data. >>>> >>>>> wva@amcat:~/tmp$ isql -v AmcatDB >>>>> +---------------------------------------+ >>>>> | Connected! >>>>> [...] >>>>> +---------------------------------------+ >>>>> SQL> select top 1 projectid, name from projects >>>>> [...] >>>>> | 1 | test >>>>> [...] >>>>> SQLRowCount returns 1 >>>>> 1 rows fetched >>>>> >>>>> wva@amcat:~/tmp$ python testodbc.py >>>>> connected to Microsoft SQL Server 08.00.2039 >>>>> Executed, fetching... >>>>> [(1,)] >>>>> Executed, fetching... >>>>> Segmentation fault >>>> >>>> Could you send us the core dump of this segfault ? It is most likely >>>> a problem in the new FreeTDS ODBC driver. FreeTDS 0.63 works just fine >>>> on x64 machines. >>> >>> ... and so does version 0.64. We're testing 0.82 now. Did you compile >>> FreeTDS against unixODBC or iODBC ? >>> >>>> It would be great if you could also provide the table >>>> definition and example data that allows us reproducing the >>>> error on our servers. >>>> >>>>> wva@amcat:~/tmp$ cat testodbc.py >>>>> import mx.ODBC >>>>> db = mx.ODBC.unixODBC.connect("AmcatDB", "", "") >>>>> print "connected to %s %s" % (db.dbms_name, db.dbms_version) >>>>> c = db.cursor() >>>>> c.executedirect("select top 1 projectid from projects") >>>>> print "Executed, fetching..." >>>>> print c.fetchall() >>>>> c.executedirect("select top 1 projectid, name from projects") >>>>> print "Executed, fetching..." >>>>> >>>>> print c.fetchall()wva@amcat:~/tmp$ uname -a >>>>> Linux amcat 2.6.18-6-amd64 #1 SMP Sun Feb 10 17:50:19 UTC 2008 x86_64 >>>>> GNU/Linux >>>>> wva@amcat:~/tmp$ python -c "import >>>>> sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'" >>>>> UCS4 >>>>> >>>>> As you can see, it returns the MS SQL version number so it has some >>>>> contact with the remote db. I installed using >>>>> egenix-mxodbc-3.0.1.linux-x86_64-py2.5_ucs4.prebuilt.zip, which I >>>>> think should be OK as x86_64 == AMD64 (right?). projected is int, >>>>> name is a varchar(255) column, and the table should have a couple >>>>> hundred entries at most. >>>>> >>>>> The relevant etc files: >>>>> >>>>> wva@amcat:~/tmp$ tail -4 /usr/local/freetds/etc/freetds.conf >>>>> [amcatdb] >>>>> host = localhost >>>>> port = 1433 >>>>> tds version = 8.0 >>>>> wva@amcat:~/tmp$ cat /etc/odbc.ini >>>>> [AmcatDB] >>>>> Driver = FreeTDS >>>>> Description = amcatdb MS SQL Database >>>>> Trace = No >>>>> Servername = amcatdb >>>>> Database = anoko >>>>> wva@amcat:~/tmp$ cat /etc/odbcinst.ini >>>>> [FreeTDS] >>>>> Description = v0.63 with protocol v8.0 >>>>> Driver = /usr/local/freetds/lib/libtdsodbc.so >>>>> UsageCount = 1 >>>>> >>>>> Note that I am using an SSH tunnel to connect to the sql server, >>>>> hence the localhost. This does not give trouble using either tsql, >>>>> isql, or python-sybase (on a previous install), so I am not >>>>> expecting this to be the cause of the problem. >>>>> >>>>> Any help greatly appreciated! >>>> >>>> Thanks, >>> >> > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 03 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 33 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mal at egenix.com Fri Jun 6 23:14:28 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jun 6 22:14:45 2008 Subject: [egenix-users] Installing mxODBC Zope DA for use in Plone 3.x Message-ID: <48499AA4.3020809@egenix.com> The Plone universal installer ships with its own Python and Zope installation. As a result the installation procedure for our Zope DA has to be adapted to the Plone setup. The following assumes that you are using the unified Plone 3.1 installer and its default standalone configuration. For a Plone 3.1 standalone installation: ---------------------------------------- cd /opt/Plone-3.1/ # Unzip the mxODBC Zope DA ZIP file in the instance directory unzip -d zinstance/parts/instance \ egenix-mxodbc-zopeda-1.0.10.*-py2.4_ucs2.zip # Move the product package into place mv zinstance/parts/instance/lib/python/Products/mxODBCZopeDA \ zinstance/products/ # Remove the no longer needed Products/ directory to avoid # confusion rmdir zinstance/parts/instance/lib/python/Products then install the license files into /opt/Plone-3.1/zinstance/parts/instance/lib/python/mx/ODBC and restart Plone. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 06 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 30 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mj at zopatista.com Sat Jun 7 00:03:22 2008 From: mj at zopatista.com (Martijn Pieters) Date: Fri Jun 6 23:03:52 2008 Subject: [egenix-users] Installing mxODBC Zope DA for use in Plone 3.x In-Reply-To: <48499AA4.3020809@egenix.com> References: <48499AA4.3020809@egenix.com> Message-ID: <21a6ef160806061403w50d76668w96c7d25bef830214@mail.gmail.com> On Fri, Jun 6, 2008 at 10:14 PM, M.-A. Lemburg wrote: > The Plone universal installer ships with its own Python and Zope > installation. As a result the installation procedure for our > Zope DA has to be adapted to the Plone setup. How about providing a packaging without the lib/python/Products path? Many a setup uses the standard extra-products-paths feature of zope where additional directories are part of the Products namespace. This would also allow automated inclusion into a buildout simply by using the productdistros recipe (where you specify a URL of a compressed Product archive to install). -- Martijn Pieters From mal at egenix.com Sat Jun 7 00:29:25 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jun 6 23:29:42 2008 Subject: [egenix-users] Installing mxODBC Zope DA for use in Plone 3.x In-Reply-To: <21a6ef160806061403w50d76668w96c7d25bef830214@mail.gmail.com> References: <48499AA4.3020809@egenix.com> <21a6ef160806061403w50d76668w96c7d25bef830214@mail.gmail.com> Message-ID: <4849AC35.8030807@egenix.com> On 2008-06-06 23:03, Martijn Pieters wrote: > On Fri, Jun 6, 2008 at 10:14 PM, M.-A. Lemburg wrote: >> The Plone universal installer ships with its own Python and Zope >> installation. As a result the installation procedure for our >> Zope DA has to be adapted to the Plone setup. > > How about providing a packaging without the lib/python/Products path? > Many a setup uses the standard extra-products-paths feature of zope > where additional directories are part of the Products namespace. This > would also allow automated inclusion into a buildout simply by using > the productdistros recipe (where you specify a URL of a compressed > Product archive to install). The Zope DA relies on the mx package which must be installed as top-level package, so simply removing the lib/python/Products path is not really an option, AFAIK. Would love to be proven wrong :-) For the next release we'll ship a version that's easier to install and integrates into Plone and other buildout-based setups using either a special recipe or as egg - among other enhancements, of course. We'll start working on that after we've kicked off the public beta for our new mxODBC Connect product next week. A new mxODBC Connect Zope DA will follow soon after the final release of the Python product. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 06 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 30 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From mj at zopatista.com Sat Jun 7 01:14:10 2008 From: mj at zopatista.com (Martijn Pieters) Date: Sat Jun 7 00:14:37 2008 Subject: [egenix-users] Installing mxODBC Zope DA for use in Plone 3.x In-Reply-To: <4849AC35.8030807@egenix.com> References: <48499AA4.3020809@egenix.com> <21a6ef160806061403w50d76668w96c7d25bef830214@mail.gmail.com> <4849AC35.8030807@egenix.com> Message-ID: <21a6ef160806061514u3ab0aaf1mdf1468d74d9dae62@mail.gmail.com> On Fri, Jun 6, 2008 at 11:29 PM, M.-A. Lemburg wrote: > The Zope DA relies on the mx package which must be installed as > top-level package, so simply removing the lib/python/Products path > is not really an option, AFAIK. Would love to be proven wrong :-) Right, I forgot, sorry! You could just unbundle the two and specify the dependency. :-) > For the next release we'll ship a version that's easier to install > and integrates into Plone and other buildout-based setups using > either a special recipe or as egg - among other enhancements, of > course. Make it a Products. egg like current CMF* and CMFPlone practice (see their respective svn repositories; basically just put it in a Products directory with setuptools namespace declaration and rigging). You should be able to provide old-style packagings as well still. -- Martijn Pieters From info at egenix.com Thu Jun 12 23:04:46 2008 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Thu Jun 12 22:23:26 2008 Subject: [egenix-users] ANN: eGenix pyOpenSSL Distribution 0.7.0-0.9.8h-1 Message-ID: <4851815E.7050109@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.7.0-0.9.8h-1 An easy to install and use repackaged distribution of the pyOpenSSL Python interface for OpenSSL - available on Windows and Unix platforms This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-pyOpenSSL-Distribution-0.7.0-0.9.8h-1-GA.html ________________________________________________________________________ INTRODUCTION The eGenix.com pyOpenSSL Distribution includes everything you need to get started with SSL in Python. It comes with an easy to use installer that includes the most recent OpenSSL library versions in pre-compiled form. pyOpenSSL is an open-source Python add-on (http://pyopenssl.sf.net/). OpenSSL is an open-source implementation of the SSL protocol (http://www.openssl.org/). * About Python: Python is an object-oriented Open Source programming language which runs on all modern platforms (http://www.python.org/). By integrating ease-of-use, clarity in coding, enterprise application connectivity and rapid application design, Python establishes an ideal programming platform for todays IT challenges. * About eGenix: eGenix is a consulting and software product company focused on providing professional quality services and products to Python users and developers (http://www.egenix.com/). ________________________________________________________________________ NEWS This is the first release of the eGenix.com pyOpenSSL Distribution. It includes pyOpenSSL 0.7.0 and the OpenSSL 0.9.8h libraries on all supported platforms. ________________________________________________________________________ DOWNLOADS The download archives and instructions for installing the package can be found at: http://www.egenix.com/products/python/pyOpenSSL/ ________________________________________________________________________ UPGRADING Before installing this version of pyOpenSSL, please make sure that you uninstall any previously installed pyOpenSSL version. Otherwise, you could end up not using the included OpenSSL libs. _______________________________________________________________________ SUPPORT Commercial support for these packages is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 12 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 24 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From info at egenix.com Mon Jun 16 13:12:26 2008 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Mon Jun 16 12:16:47 2008 Subject: [egenix-users] ANN: eGenix mxODBC Connect Database Interface for Python 0.9.1 (beta) Message-ID: <48563C8A.6090005@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mxODBC Connect Database Interface for Python Version 0.9.1 (beta) Our new client-server product for connecting Python applications to relational databases - on all major platforms This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-Connect-0.9.1-beta.html ________________________________________________________________________ INTRODUCTION The mxODBC Connect Database Interface for Python allows users to easily connect Python applications to all major databases on the market today in a highly portable and convenient way. This makes mxODBC Connect the ideal basis for writing cross-platform database programs and utilities in Python. mxODBC Connect extends our eGenix mx Python Extension series with a new client-server based product, that removes the need to install and configure ODBC drivers on the client side. This greatly simplifies setup and configuration of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure. * About Python: Python is an object-oriented Open Source programming language which runs on all modern platforms (http://www.python.org/). By integrating ease-of-use, clarity in coding, enterprise application connectivity and rapid application design, Python establishes an ideal programming platform for todays IT challenges. * About eGenix: eGenix is a consulting and software product company focused on providing professional quality services and products to Python users and developers (http://www.egenix.com/). ________________________________________________________________________ HOW IT WORKS mxODBC Connect consists of two parts: a server installation which typically runs directly on the database server and a client Python package which is installed on the client machine that runs the Python application. The server part uses our high-performance database adapter mxODBC to connect to the database server. The client package communicates with the server part over a TCP/IP network, optionally using SSL encryption, advanced authentication and access controls - a feature that many database drivers fail to deliver. By separating the client application database interface from the server and using mxODBC Connect, you gain several benefits: * high portability and flexibility * centralized configuration and administration * added security * automatic fail-over * scalability * lower costs For more information, please have a look at the product page: http://www.egenix.com/products/python/mxODBCConnect/ ________________________________________________________________________ NEWS mxODBC Connect 0.9 is a public beta release of our new mxODBC Connect product. If you would like to participate in the beta, please see our beta program page: http://www.egenix.com/products/python/mxODBCConnect/beta.html *SPECIAL OFFER* In order to make participation in the beta program more interesting for our users, we will be giving out *free discount coupons* to all participants who report back bugs in the product. ________________________________________________________________________ DOWNLOADS The download archives as well as instructions for installation and configuration of the product can be found on the product page: http://www.egenix.com/products/python/mxODBCConnect/ _______________________________________________________________________ SUPPORT Commercial support for this product is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 16 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 20 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From info at egenix.com Wed Jun 18 19:26:54 2008 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Wed Jun 18 18:35:26 2008 Subject: [egenix-users] ANN: eGenix mx Base Distribution 3.1.0 Message-ID: <4859374E.3090708@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mx Base Distribution Version 3.1.0 Open Source Python extensions providing important and useful services for Python programmers. This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mx-Base-Distribution-3.1.0-GA.html ________________________________________________________________________ ABOUT The eGenix.com mx Base Distribution for Python is a collection of professional quality software tools which enhance Python's usability in many important areas such as fast text searching, date/time processing and high speed data types. The tools have a proven record of being portable across many Unix and Windows platforms. You can write applications which use the tools on Windows and then run them on Unix platforms without change due to the consistent platform independent interfaces. Contents of the distribution: * mxDateTime - Date/Time Library for Python * mxTextTools - Fast Text Parsing and Processing Tools for Python * mxProxy - Object Access Control for Python * mxBeeBase - On-disk B+Tree Based Database Kit for Python * mxURL - Flexible URL Data-Type for Python * mxUID - Fast Universal Identifiers for Python * mxStack - Fast and Memory-Efficient Stack Type for Python * mxQueue - Fast and Memory-Efficient Queue Type for Python * mxTools - Fast Everyday Helpers for Python All available packages have proven their stability and usefulness in many mission critical applications and various commercial settings all around the world. * About Python: Python is an object-oriented Open Source programming language which runs on all modern platforms (http://www.python.org/). By integrating ease-of-use, clarity in coding, enterprise application connectivity and rapid application design, Python establishes an ideal programming platform for todays IT challenges. * About eGenix: eGenix is a consulting and software product company focused on providing professional quality services and products to Python users and developers (http://www.egenix.com/). ________________________________________________________________________ NEWS The 3.1.0 release of the eGenix mx Base Distribution has a number of enhancements over the previous version 3.0.0. Apart from a few minor bug fixes, it provides a few new features: Some highlights: * mxTools now has a new mx.Tools.dlopen() function which allow loading shared libraries explicitly and from a specific path. This allows working around problems with not being able to dynamically set LD_LIBRARY_PATH on Unix platforms. * mxTools can be configured to expose a new API called mx.Tools.setproctitle() which allows setting the process title on Unix platforms. * mxBeeBase comes with a new on-disk dictionary version called BeeFixedLengthStringDict, which allows using keys with embedded \0 characters. * mxSetup, our Python distutils extension, can now build prebuilt archives that no longer require the "... build --skip ..." command to skip the build process. The uninstall command now also works for prebuilt archives and the bdist_prebuilt command has been enhanced to be able to build pure Python distributions as well. * mxSetup now also works together with setuptools to e.g. build and install the packages as eggs. Run setup.py with --use-setuptools to enable this support. For a more detailed description of changes, please see the respective package documentation on our web-site. As always, we are providing pre-compiled versions of the package for the most popular Python platforms. For all others, you can compile the package from source using "python setup.py install". ________________________________________________________________________ DOWNLOADS The download archives and instructions for installing the packages can be found on the eGenix mx Base Distribution page: http://www.egenix.com/products/python/mxBase/ ________________________________________________________________________ LICENSE The eGenix mx Base package is distributed under the eGenix.com Public License 1.1.0 which is a CNRI Python License style Open Source license. You can use the package in both commercial and non-commercial settings without fee or charge. The package comes with full source code ________________________________________________________________________ SUPPORT Commercial support for these packages is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jun 18 2008) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania 18 days to go :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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 From gregcorradini at gmail.com Mon Jun 23 12:20:59 2008 From: gregcorradini at gmail.com (Greg Corradini) Date: Mon Jun 23 18:21:25 2008 Subject: [egenix-users] Simple mx.ODBC Update question Message-ID: <429320790806230920g6563aaf7qa49341ef03291605@mail.gmail.com> Hello all, Can I use mx.ODBC to write an UPDATE SQL statement using a list of tuples and a parameterized statement format? For example, I can batch INSERT with the following parameterized statement using "?": *cursor.executemany("Insert into MYTABLE(ID,VALUE) values(?,?)", dataAsListofTuples)* Using mxODBC is there a parameterized Update statement like above? -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20080623/5c0238e4/attachment.htm From mal at egenix.com Tue Jun 24 00:31:52 2008 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jun 24 00:00:49 2008 Subject: [egenix-users] Simple mx.ODBC Update question In-Reply-To: <429320790806230920g6563aaf7qa49341ef03291605@mail.gmail.com> References: <429320790806230920g6563aaf7qa49341ef03291605@mail.gmail.com> Message-ID: <48601648.5020205@egenix.com> Greg Corradini wrote: > Hello all, > Can I use mx.ODBC to write an UPDATE SQL statement using a list of tuples > and a parameterized statement format? Yes. > For example, I can batch INSERT with the following parameterized statement > using "?": > *cursor.executemany("Insert into MYTABLE(ID,VALUE) values(?,?)", > dataAsListofTuples)* > > Using mxODBC is there a parameterized Update statement like above? Sure. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2008-07-07: EuroPython 2008, Vilnius, Lithuania :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX 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