473,473 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sybase module 0.37 released

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/piper...er/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/proje....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
Jul 18 '05 #1
0 1177

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dbmethods | last post by:
I just installed Sybase ASE 11.9.2. I did "apt-get install php4-sybase" and it failed to install. Where I can a stable php4-sybase debian package? Thanks
0
by: Skip Montanaro | last post by:
I downloaded and built Object Craft's Sybase module but can't import it: % PYTHONSTARTUP= python Python 2.4a0 (#4, Mar 31 2004, 15:02:21) on sunos5 Type "help", "copyright", "credits" or...
0
by: Dave Cole | last post by:
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...
0
by: Dave Cole | last post by:
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...
2
by: eight02645999 | last post by:
hi i am writing a CGI to process some database transactions using the Sybase module. so in my CGI script, i have: .... import Sybase import cgitb; cgitb.enable(display=1 ,...
1
by: Sébastien Sablé | last post by:
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. MAJOR CHANGES...
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
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. The module is...
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
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. The module is...
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
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. The module is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.