Re: Sybase module 0.38pre1 released
"Sébastien Sablé" <[email protected]> Wed, 13 Dec 2006 16:32:11 +0100
| Newsgroups | gmane.comp.python.sybase |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_96517_12787786.1166023931883 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Paul, the Sybase documentation is very poor about CS_LONG, it doesn't seem to appear anywhere (in sybase 12.5 and 15 reference manual). I only found it in cstypes.h where it is defined as a long and not a long long. So I have modified your patch in order to use a long (see attached patch). Please check that it works as expected. Also there is now a CS_BIGINT type in Sybase 15 which is a "long long". I will make a modification in coming days so that with sybase 15, the CS_BIGINT type is used by default instead of CS_LONG when passing long Python objects to DataBuf. regards -- S=E9bastien Sabl=E9 2006/12/12, Paul Rensing <[email protected]>: > Sebastien, > > Thanks for taking this over. > > I sent in a small patch a long time ago dealing with handling 8-byte ints= . I > checked and it is not included in the 0.38pre1 package, so here it is aga= in > (agaist 0.37 code). I apologize that this is not a complete patch for the > problem. I only included the read operation and there may be other data > types that should be added. > > Paul Rensing > > > > On 12/12/06, S=E9bastien Sabl=E9 <[email protected]> wrote: > > > > 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 SINCE 0.37: > > > > * This release works with python 2.5 > > > > * It also works with sybase 15 > > > > * It works with 64bits clients > > > > * It can be configured to return native python datetime objects > > > > * The bug "This routine cannot be called because another command > > structure has results pending." which appears in various cases has > > been corrected > > > > * It includes a unitary test suite based on the dbapi2.0 compliance > > test suite > > _______________________________________________ > > Python-sybase mailing list > > [email protected] > > > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase > > > > > ------=_Part_96517_12787786.1166023931883 Content-Type: text/x-patch; name=cs_long_support.diff; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_evnwhfy9 Content-Disposition: attachment; filename="cs_long_support.diff"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WQgZmxv YXRfZGF0YWZtdChDU19EQVRBRk1UICpmbXQpCiB7CiAgICAgbWVtc2V0KGZtdCwgMCwgc2l6ZW9m KCpmbXQpKTsK ------=_Part_96517_12787786.1166023931883 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Python-sybase mailing list [email protected] https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase ------=_Part_96517_12787786.1166023931883--