You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(3) |
Apr
(26) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
(6) |
Nov
(14) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(31) |
Feb
(15) |
Mar
(6) |
Apr
(18) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(1) |
Nov
(2) |
Dec
(6) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
(18) |
Apr
(4) |
May
(13) |
Jun
(32) |
Jul
(21) |
Aug
(22) |
Sep
(11) |
Oct
(2) |
Nov
(6) |
Dec
(5) |
2005 |
Jan
(4) |
Feb
(16) |
Mar
(21) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(20) |
Dec
|
2006 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(5) |
May
(4) |
Jun
(6) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(8) |
Nov
|
Dec
(12) |
2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(9) |
Jun
(1) |
Jul
(6) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(21) |
Sep
(11) |
Oct
(4) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2011 |
Jan
(9) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Grant M. <gmc...@in...> - 2005-07-06 23:27:39
|
Hi, I received the following error when trying to do an update: ct_send(): user api layer: external error: This routine cannot be called because another command structure has results pending. This update occurs after a select using a Cursor object which I haven't yet closed. If I close the select cursor object prior to trying to do the update I no longer get this problem. I found reference to this problem in a Sybase manual which mentioned that ct_results needed to return a value before the results set was considered processed. Do I need to call .return_status on the select cursor before I can use another cursor to do an update? Or do I have to close the select cursor before doing any updates? Regards, Grant M. P.S. both the select and the update were to the same table. |
From: Glen J. <gl...@be...> - 2005-07-02 18:50:58
|
I have been trying to get python-sybase to compile for Windows (XP), but have not had any luck finding the right compiler. I have looked for it at Microsoft, E-Bay, and several computer stores that recycle old versions of software. I tried using the Borland compiler. Converting the sybase libraries seemed like an okay thing to do, but when the build script began complaining about the installed Python libraries, I thought it was time to quit. Converting those libraries to another format did not seem like an okay thing to do. Can anyone tell me how to deal with this? If not, I have to go back to embedding isql calls inside python scripts..... Thanks in advance for any suggestions. Glen Jackson ============ Museum Informatics Project |
From: Dave C. <dj...@ob...> - 2005-07-01 16:38:04
|
Andrey Plotnikov wrote: > Hi All! > > I use sybase-python and freetds with MSSQL. > And I have the following problem: the space symbol is added to the > string and binary parameters. > For example: > c.execute("insert into Tmp (f1) values (@s)",{"@s":"test"}) > As a result, field f1 value is "test " > For string params its not vastly actual, but binary data can be passed > only through params and space symbol at the end is serious problem. > > FreeDTS version is 0.62.3 > I tried sybase-python 0.36 and 0.37. > > P.S. Sorry for my english... It is probably worth raising this on one of the FreeTDS mailing lists. - Dave -- http://www.object-craft.com.au |
From: Andrey P. <ap...@sb...> - 2005-06-30 20:34:23
|
Hi All! I use sybase-python and freetds with MSSQL. And I have the following problem: the space symbol is added to the string and binary parameters. For example: c.execute("insert into Tmp (f1) values (@s)",{"@s":"test"}) As a result, field f1 value is "test " For string params its not vastly actual, but binary data can be passed only through params and space symbol at the end is serious problem. FreeDTS version is 0.62.3 I tried sybase-python 0.36 and 0.37. P.S. Sorry for my english... -- Andrey Plotnikov |
From: Skip M. <sk...@po...> - 2005-06-15 17:16:41
|
>> I need to perform inserts and updates to a Sybase database >> asynchronously. Is there already a mechanism in sybase-python to do >> this? I see the Sybase module uses threads extensively. Dave> I suppose the best way to do this would be to perform the SQL Dave> operations in one or more separate Python threads. That's pretty much what I came up with. My initial tests at the command prompt led me to believe that maybe I'd done something wrong, but I think I was fine. An AsyncConnection class has its own hidden cursor and a Queue. The client gets a fake cursor that does nothing more than stuff the (sql, params) tuple into the queue where it's picked up and executed by the real cursor running in a daemon thread. Skip |
From: Dave C. <dj...@ob...> - 2005-06-15 16:50:41
|
Skip Montanaro wrote: > I need to perform inserts and updates to a Sybase database asynchronously. > Is there already a mechanism in sybase-python to do this? I see the Sybase > module uses threads extensively. I suppose the best way to do this would be to perform the SQL operations in one or more separate Python threads. - Dave -- http://www.object-craft.com.au |
From: Skip M. <sk...@po...> - 2005-06-15 12:43:54
|
I need to perform inserts and updates to a Sybase database asynchronously. Is there already a mechanism in sybase-python to do this? I see the Sybase module uses threads extensively. Thx, -- Skip Montanaro sk...@po... |
From: Alexey M. <sa...@ri...> - 2005-06-09 02:16:10
|
Hello, I'v try to install python-sybase module (verison 0.37). It completelly compiled and installed. but i can't use it because of this: morsov@router ~ $ python Python 2.3.3 (#1, Feb 7 2005, 18:57:53) [GCC 3.3.3 20040412 (ALT Linux, build 3.3.3-alt5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase >>> db = Sybase.connect("***","***","***") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/Sybase.py", line 1005, in connect strip, auto_commit, delay_connect, locking) File "/usr/lib/python2.3/site-packages/Sybase.py", line 867, in __init__ self.connect() File "/usr/lib/python2.3/site-packages/Sybase.py", line 886, in connect status = conn.ct_connect(self.dsn) File "/usr/lib/python2.3/site-packages/Sybase.py", line 200, in _servermsg_cb raise DatabaseError(_fmt_server(msg)) Sybase.DatabaseError: Msg 21, Level 10 TDS: unexpected token 95 >>> i'v compile it with Freetds. environment vars morsov@router ~ $ echo $SYBASE $LD_LIBRARY_PATH /usr /usr/lib with it i'v compiel this module. tsql and sqsh connect to this database. Can i fix this somehow ? -- WBR, Alexey Morsov |
From: Bradley F. <br...@re...> - 2005-05-13 14:32:08
|
I'm having a bear of a time getting the environment right for compiling = the Sybase module on Windows, following the instructions. I've spent a = great deal of time already and still can't make python and bcc happy. If someone has a set of binaries they could email to me, I'd greatly appreciate it. Using it locally from windows saves me the trouble of = always remote-debugging through Komodo. Thanks Bradley |
From: Jan J. <j2...@mu...> - 2005-04-14 08:54:46
|
>On Linux you will be more sucessful it you install the Sybase module and >using it to talk to SQL Server. Any links on how to accomplish that? |
From: Dave C. <dj...@ob...> - 2005-04-13 16:41:12
|
Jan Johansson <j2...@mu...>Jan Johansson wrote: > I am trying to install http://www.object-craft.com.au/projects/mssql/ on my > Debian system, but when i try to build, i end up with the below. > > hooch:~/Download/Asterisk/MSSQL-0.09# python setup.py install [snip lots of errors] FreeTDS is a bit of a moving target, and the MSSQL module is not maintained as actively as the Sybase module. MSSQL works best when compiled using the db library from MS on Windows :-). On Linux you will be more sucessful it you install the Sybase module and using it to talk to SQL Server. - Dave -- http://www.object-craft.com.au |
From: Dave C. <dj...@ob...> - 2005-04-13 16:37:24
|
thi...@ya... wrote: > Any help on trying to update a column in a table that > is large ie 18k +. I tried to use the cursor and did > an execute "update table set column=@data" but it > raises an error saying something about the data is to > large for a data field even though the field in the > database is text and large enough to hold it. > > I am a newbie using this library and using sybase in > general so hopefully this is easy one to answer. > Thanks From memory there is a way to do this using the CT library, but it does not fit the way that the DB-API is supposed to work. If there is enough interest I could go back and read the documentation, implement the missing CT functions, and then try to wrap the functionality in some higher level Python. - Dave -- http://www.object-craft.com.au |
From: Marcos P. <ma...@bu...> - 2005-04-13 00:01:25
|
Disregard this message. The whole linux setup was falling apart. I blame disk corruption. I have reinstalled and it works fine. El mar, 05-04-2005 a las 17:31 +0200, Marcos Sánchez Provencio escribió: > The module seems to build fine, but I am not able to import it. Has > anybody been successful? > > marcos@quina:~ $ python > Python 2.4.1 (#2, Mar 30 2005, 21:51:10) > [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Sybase > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.4/site-packages/Sybase.py", line 20, in ? > from sybasect import * > ImportError: /lib/libc.so.6: undefined symbol: register_match6 > > -----====----- > And this is the ldd output: > > marcos@quina:~ $ ldd /usr/local/lib/python2.4/site-packages/sybasect.so > ldd: /usr/local/lib/python2.4/site-packages/sybasect.so: No existe el > fichero o el directorio > marcos@quina:~ $ ldd /usr/lib/python2.4/site-packages/sybasect.so > libct.so.1 => /usr/lib/libct.so.1 (0xb7faa000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 > (0xb7f9a000) > /lib/libc.so.6 => /lib/libc.so.6 (0xb7f97000) > libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7f83000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e56000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) > -----====----- > SYBASE is /usr > freetds-dev deb package version is 0.61-6.1 > python2.4 deb package version is 2.4.1-0 > > > > _______________________________________________ > Python-sybase mailing list > Pyt...@ww... > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Skip M. <sk...@po...> - 2005-04-12 19:25:50
|
Jeff> Oh boy. This one is *not* an easy one to solve. The sybase Jeff> protocol doesn't handle blocks larger than 16k. (I hope I'm Jeff> actually wrong about this.) In order to send larger blocks you Jeff> have to use the lower level libraries. Can you do something like this? chunk = data[:1000] del data[:1000] c.execute("update table set column=@chunk where ...", {"@chunk": chunk}) while data: chunk = data[:1000] del data[:1000] c.execute("update table set column=concat(column,@chunk) where ...", {"@chunk": chunk}) Kind clunky, but might do the trick in a pinch. (I assume concat() is a standard SQL function. YMMV.) Skip |
From: Jeff Y. <jyo...@of...> - 2005-04-12 16:38:45
|
Oh boy. This one is *not* an easy one to solve. The sybase protocol doesn't handle blocks larger than 16k. (I hope I'm actually wrong about this.) In order to send larger blocks you have to use the lower level libraries. You have to look up the row that you want to insert the data into, get a handle to the field you want, and then repeatedly send sub-16k chunks of data. It's not pretty. I'd be glad to contribute the code to do it, but unfortunately it is my employer's property. (*ugh*) I'd ask my boss to release it, but he's on vacation at the moment. All I can say is, sob now. Sob very hard. -jeff On Apr 11, 2005, at 4:16 PM, thi...@ya... wrote: > Any help on trying to update a column in a table that > is large ie 18k +. I tried to use the cursor and did > an execute "update table set column=@data" but it > raises an error saying something about the data is to > large for a data field even though the field in the > database is text and large enough to hold it. > > I am a newbie using this library and using sybase in > general so hopefully this is easy one to answer. > Thanks |
From: <thi...@ya...> - 2005-04-12 16:16:11
|
Any help on trying to update a column in a table that is large ie 18k +. I tried to use the cursor and did an execute "update table set column=@data" but it raises an error saying something about the data is to large for a data field even though the field in the database is text and large enough to hold it. I am a newbie using this library and using sybase in general so hopefully this is easy one to answer. Thanks __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ |
From: Jan J. <j2...@mu...> - 2005-04-09 23:16:43
|
I am trying to install http://www.object-craft.com.au/projects/mssql/ on my Debian system, but when i try to build, i end up with the below. hooch:~/Download/Asterisk/MSSQL-0.09# python setup.py install running install running build running build_py not copying MSSQL.py (output up-to-date) running build_ext building 'mssqldb' extension creating build/temp.linux-i686-2.2 gcc -DNDEBUG -g -O3 -fno-strict-aliasing -Wall -Wstrict-prototypes -fPIC -DHAVE_FREETDS -DHAVE_DBALTBIND -DHAVE_DBCLROPT -DHAVE_DBCURCMD -DHAVE_DBCURROW -DHAVE_DBISOPT -DHAVE_DBNUMCOMPUTE -DHAVE_DBRETTYPE -I/usr/include -I/usr/include/python2.2 -c mssqldb.c -o build/temp.linux-i686-2.2/mssqldb.o gcc -DNDEBUG -g -O3 -fno-strict-aliasing -Wall -Wstrict-prototypes -fPIC -DHAVE_FREETDS -DHAVE_DBALTBIND -DHAVE_DBCLROPT -DHAVE_DBCURCMD -DHAVE_DBCURROW -DHAVE_DBISOPT -DHAVE_DBNUMCOMPUTE -DHAVE_DBRETTYPE -I/usr/include -I/usr/include/python2.2 -c loginrec.c -o build/temp.linux-i686-2.2/loginrec.o gcc -DNDEBUG -g -O3 -fno-strict-aliasing -Wall -Wstrict-prototypes -fPIC -DHAVE_FREETDS -DHAVE_DBALTBIND -DHAVE_DBCLROPT -DHAVE_DBCURCMD -DHAVE_DBCURROW -DHAVE_DBISOPT -DHAVE_DBNUMCOMPUTE -DHAVE_DBRETTYPE -I/usr/include -I/usr/include/python2.2 -c dbproc.c -o build/temp.linux-i686-2.2/dbproc.o dbproc.c:199: warning: `wrap_DbProcIntFunc_bool' defined but not used gcc -DNDEBUG -g -O3 -fno-strict-aliasing -Wall -Wstrict-prototypes -fPIC -DHAVE_FREETDS -DHAVE_DBALTBIND -DHAVE_DBCLROPT -DHAVE_DBCURCMD -DHAVE_DBCURROW -DHAVE_DBISOPT -DHAVE_DBNUMCOMPUTE -DHAVE_DBRETTYPE -I/usr/include -I/usr/include/python2.2 -c databuf.c -o build/temp.linux-i686-2.2/databuf.o databuf.c: In function `get_buff_value': databuf.c:86: error: `DBVARYCHAR' undeclared (first use in this function) databuf.c:86: error: (Each undeclared identifier is reported only once databuf.c:86: error: for each function it appears in.) databuf.c:86: error: parse error before ')' token databuf.c:87: error: parse error before ')' token databuf.c:90: error: `DBBIT' undeclared (first use in this function) databuf.c:90: error: parse error before ')' token databuf.c: In function `DataBuf_set': databuf.c:155: error: `DBVARYCHAR' undeclared (first use in this function) databuf.c:155: error: parse error before ')' token databuf.c:160: error: parse error before ')' token databuf.c:161: error: parse error before ')' token databuf.c:169: error: `DBBIT' undeclared (first use in this function) databuf.c:169: error: parse error before ')' token databuf.c: In function `DataBuf__init__': databuf.c:270: error: `DBVARYCHAR' undeclared (first use in this function) databuf.c:273: error: `DBBIT' undeclared (first use in this function) error: command 'gcc' failed with exit status 1 hooch:~/Download/Asterisk/MSSQL-0.09# _______________________________________________ Tutor maillist - Tu...@py... http://mail.python.org/mailman/listinfo/tutor |
From: Dave C. <dj...@ob...> - 2005-04-07 16:07:49
|
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. NOTES: The 0.37 release is identical to 0.37pre3 as no problems were reported with the prerelease. This release contains a number of small bugfixes and patches received from users. I have been unable to find the source of the memory leak reported here: http://www.object-craft.com.au/pipermail/python-sybase/2004-December/000346.html The test program I wrote follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import sys import Sybase db = Sybase.connect(..., auto_commit=True) db.execute(''' if exists (select name from sysobjects where name = "sp_test_leak") begin drop procedure sp_test_leak end ''') db.execute(''' create procedure sp_test_leak @arg int as select @arg ''') for i in range(200): for j in range(1000): c = db.cursor() c.callproc('sp_test_leak', {'@arg': 12345 }) sys.stdout.write('%3d\r' % i) sys.stdout.flush() sys.stdout.write('\n') - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If someone is able to modify this and come up with a leaking result I am interested in working on the fix. You can build for FreeTDS like this: python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre3.tar.gz The module home page is here: http://www.object-craft.com.au/projects/sybase/ CHANGES SINCE 0.36: * Fix FreeTDS compilation and rearrange header includes to remove warnings. * Cursor state initialisation fix from Skip Montanaro. * Callback declaration fix on Windows from Vadim Beloborodov. * Cursor output parameters now work when parameters are passed as a sequence. * Output parameters now work for FreeTDS 0.62.4. 1> create procedure sp_test_output 2> @num int, @result int output 3> as 4> select @result = @num 5> go params = c.callproc('sp_test_output', {'@num': 12345, '@result': Sybase.OUTPUT(1)}) print params['@result'] * The CS_STATUS_RESULT result set is now consumed internally in the Cursor and does not appear in the result sets consumed by the fetch and nextset methods. The return value from the stored procedure is available in the .return_status member of the Cursor. It will only contain a meaningful value once all of the row result sets have been consumed. Note that this does not work with FreeTDS 0.62.4. The return_status seems to always be 0. Research shows that the problem is probably in the CT emulation layer as tsql displays the correct value, but sqsh displays 0. * Output hook patch from Ty Sarna has been applied. * Applied patch from Andre Sedinin to improve error handling. * Improved detection of SYBASE_OCS. -- http://www.object-craft.com.au |
From: Marcos P. <ma...@bu...> - 2005-04-06 08:31:48
|
The module seems to build fine, but I am not able to import it. Has anybody been successful? marcos@quina:~ $ python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/Sybase.py", line 20, in ? from sybasect import * ImportError: /lib/libc.so.6: undefined symbol: register_match6 -----====----- And this is the ldd output: marcos@quina:~ $ ldd /usr/local/lib/python2.4/site-packages/sybasect.so ldd: /usr/local/lib/python2.4/site-packages/sybasect.so: No existe el fichero o el directorio marcos@quina:~ $ ldd /usr/lib/python2.4/site-packages/sybasect.so libct.so.1 => /usr/lib/libct.so.1 (0xb7faa000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f9a000) /lib/libc.so.6 => /lib/libc.so.6 (0xb7f97000) libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7f83000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e56000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) -----====----- SYBASE is /usr freetds-dev deb package version is 0.61-6.1 python2.4 deb package version is 2.4.1-0 |
From: Dave C. <dj...@ob...> - 2005-03-21 18:53:54
|
Dave Cole wrote: > The module is available here: > > > http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar.gz Ooops. Make that: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre2.tar.gz - Dave -- http://www.object-craft.com.au |
From: Dave C. <dj...@ob...> - 2005-03-21 18:14:23
|
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. NOTES: This release contains a number of small bugfixes and patches received from users. I have been unable to find the source of the memory leak reported here: http://www.object-craft.com.au/pipermail/python-sybase/2004-December/000346.html The test program I wrote follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import sys import Sybase db = Sybase.connect(..., auto_commit=True) db.execute(''' if exists (select name from sysobjects where name = "sp_test_leak") begin drop procedure sp_test_leak end ''') db.execute(''' create procedure sp_test_leak @arg int as select @arg ''') for i in range(200): for j in range(1000): c = db.cursor() c.callproc('sp_test_leak', {'@arg': 12345 }) sys.stdout.write('%3d\r' % i) sys.stdout.flush() sys.stdout.write('\n') - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If someone is able to modify this and come up with a leaking result I am interested in working on the fix. You can build for FreeTDS like this: python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar.gz The module home page is here: http://www.object-craft.com.au/projects/sybase/ CHANGES SINCE 0.36: * Cursor state initialisation fix from Skip Montanaro. * Callback declaration fix on Windows from Vadim Beloborodov. * Cursor output parameters now work when parameters are passed as a sequence. * Output parameters now work for FreeTDS 0.62.4. 1> create procedure sp_test_output 2> @num int, @result int output 3> as 4> select @result = @num 5> go params = c.callproc('sp_test_output', {'@num': 12345, '@result': Sybase.OUTPUT(1)}) print params['@result'] * The CS_STATUS_RESULT result set is now consumed internally in the Cursor and does not appear in the result sets consumed by the fetch and nextset methods. The return value from the stored procedure is available in the .return_status member of the Cursor. It will only contain a meaningful value once all of the row result sets have been consumed. Note that this does not work with FreeTDS 0.62.4. The return_status seems to always be 0. Research shows that the problem is probably in the CT emulation layer as tsql displays the correct value, but sqsh displays 0. * Output hook patch from Ty Sarna has been applied. * Applied patch from Andre Sedinin to improve error handling. * Improved detection of SYBASE_OCS. - Dave -- http://www.object-craft.com.au |
From: Dave C. <dj...@ob...> - 2005-03-20 23:08:05
|
Skip Montanaro wrote: > Dave> This release contains a number of small bugfixes and patches > Dave> received from users. > > ... > > I don't see this change: > > *** /Users/skip/src/sybase-0.36/Sybase.py Sun Apr 27 05:54:35 2003 > --- /Users/skip/tmp/Sybase.py Sat Mar 19 16:46:17 2005 > *************** > *** 436,441 **** > --- 471,477 ---- > > def start(self, arraysize): > self._arraysize = arraysize > + self._set_state(_LAZY_FETCHING) > status = self._cmd.ct_send() > if status != CS_SUCCEED: > self._raise_error(Error, 'ct_send') > > You created that in response to some problems one of my users was having. Ooops. I will put together a pre2 release with that fix and the __stdcall patch from Vadim. I think I should change my strategy for releasing. Previously I had been posting small patches then waiting for feedback. That seems not to work. A better technique might be to release as soon as a patch is received and wait for feedback from that. > I also don't see anything related to Python's builtin datetime module. I > can whip up a patch based upon my local changes if you like. mx.DateTime is > nice, but overkill for most things and represents yet another thing that > needs to be installed. > > Finally, way back when I first started using the Sybase module I added a > converters arg to the Connection class. I realize that's not necessarily > everybody's idea of the best way to implement type converters, but it allows > me to pretty transparently use whatever date/time module I have available. > (Some users at work have old code that expects times to be floats in epoch > seconds as returned by time.time(). This allows them to easily use that > with minimal changes to their code.) I like the idea of doing the conversion via a configuration set of converters. Rather than have the set of converters replace the standard set, maybe the converters passed to the connection should be merged with the standard set for that connection. - Dave -- http://www.object-craft.com.au |
From: Skip M. <sk...@po...> - 2005-03-20 17:59:48
|
Dave> This release contains a number of small bugfixes and patches Dave> received from users. ... I don't see this change: *** /Users/skip/src/sybase-0.36/Sybase.py Sun Apr 27 05:54:35 2003 --- /Users/skip/tmp/Sybase.py Sat Mar 19 16:46:17 2005 *************** *** 436,441 **** --- 471,477 ---- def start(self, arraysize): self._arraysize = arraysize + self._set_state(_LAZY_FETCHING) status = self._cmd.ct_send() if status != CS_SUCCEED: self._raise_error(Error, 'ct_send') You created that in response to some problems one of my users was having. I also don't see anything related to Python's builtin datetime module. I can whip up a patch based upon my local changes if you like. mx.DateTime is nice, but overkill for most things and represents yet another thing that needs to be installed. Finally, way back when I first started using the Sybase module I added a converters arg to the Connection class. I realize that's not necessarily everybody's idea of the best way to implement type converters, but it allows me to pretty transparently use whatever date/time module I have available. (Some users at work have old code that expects times to be floats in epoch seconds as returned by time.time(). This allows them to easily use that with minimal changes to their code.) -- Skip Montanaro sk...@po... |
From: Dave C. <dj...@ob...> - 2005-03-19 22:58:33
|
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. NOTES: This release contains a number of small bugfixes and patches received from users. I have been unable to find the source of the memory leak reported here: http://www.object-craft.com.au/pipermail/python-sybase/2004-December/000346.html The test program I wrote follows: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import sys import Sybase db = Sybase.connect(..., auto_commit=True) db.execute(''' if exists (select name from sysobjects where name = "sp_test_leak") begin drop procedure sp_test_leak end ''') db.execute(''' create procedure sp_test_leak @arg int as select @arg ''') for i in range(200): for j in range(1000): c = db.cursor() c.callproc('sp_test_leak', {'@arg': 12345 }) sys.stdout.write('%3d\r' % i) sys.stdout.flush() sys.stdout.write('\n') - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If someone is able to modify this and come up with a leaking result I am interested in working on the fix. You can build for FreeTDS like this: python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar.gz The module home page is here: http://www.object-craft.com.au/projects/sybase/ CHANGES SINCE 0.36: * Cursor output parameters now work when parameters are passed as a sequence. * Output parameters now work for FreeTDS 0.62.4. 1> create procedure sp_test_output 2> @num int, @result int output 3> as 4> select @result = @num 5> go params = c.callproc('sp_test_output', {'@num': 12345, '@result': Sybase.OUTPUT(1)}) print params['@result'] * The CS_STATUS_RESULT result set is now consumed internally in the Cursor and does not appear in the result sets consumed by the fetch and nextset methods. The return value from the stored procedure is available in the .return_status member of the Cursor. It will only contain a meaningful value once all of the row result sets have been consumed. Note that this does not work with FreeTDS 0.62.4. The return_status seems to always be 0. Research shows that the problem is probably in the CT emulation layer as tsql displays the correct value, but sqsh displays 0. * Output hook patch from Ty Sarna has been applied. * Applied patch from Andre Sedinin to improve error handling. * Improved detection of SYBASE_OCS. - Dave -- http://www.object-craft.com.au |
From: Glen J. <gl...@be...> - 2005-03-19 16:44:57
|
Has anybody succeeded in compiling the python-sybase package for Mac OSX? I am unable to compile ANY Sybase module on my G4 (OS 10.3.8, ASE 12.5.1, GCC 3.3). I have tried python-sybase, sybperl, DBI-Sybase. All fail for the same reason, the linker can't find the library routines. If there is a success story, I would appreciate getting some details... Glen Jackson ========= gl...@be... |