Re: looking for a good python module for MS SQL server
Jarek Zgoda wrote:[color=blue]
> Anat napisa³(a):
>
>[color=green]
>>Does anyone know a good python mudule that works with MS SQL server?[/color]
>
>
> Google will yield something, but I prefer adodbapi over specialized
> modules. Works good with SQLServer using SSPI auth (others rather not).
>[/color]
Though it does have problems with stored procedures.
Re: looking for a good python module for MS SQL server
Anat wrote:[color=blue]
> Hi,
> Does anyone know a good python mudule that works with MS SQL server?
> Thanks,
> Anat[/color]
I use the odbc module from pywin32. I believe that it is not 100%
DB-API 2.0 compliant, but it works fine for me. It has the advantage
that if you have installed pywin32 (which is advisable on MSW anyway)
you do not have to install anything else.
I tried adodbapi a few years ago, and it seemed slow in returning
results. I don't know if it has improved in the meantime.
There is one thing I have not figured out how to do with MS-SQL - I
would be interested if anyone has a solution. I use 'scrollable
cursors' a lot. DB-API does not seem to define any methods to
facilitate this, so I construct them and manage them myself with a
series of cur.execute(... ) commands. PostgreSQL allows you to 'fetch'
multiple rows at a time. MS-SQL in its normal mode does not. This is
taken from the on-line help -
"Transact-SQL cursors are limited to fetching one row at a time. API
server cursors support fetching blocks of rows with each fetch. A
cursor that supports fetching multiple rows at a time is called a block
cursor."
It goes on to say that API's which support block cursors are OLE DB,
ODBC, ADO, and DB-Library, and that each one has its own syntax.
Do adodbapi, mxODBC, or any other modules allow you to do this?
Re: looking for a good python module for MS SQL server
Steve Holden napisa³(a):
[color=blue][color=green][color=darkred]
>>> Does anyone know a good python mudule that works with MS SQL server?[/color]
>>
>> Google will yield something, but I prefer adodbapi over specialized
>> modules. Works good with SQLServer using SSPI auth (others rather not).
>>[/color]
> Though it does have problems with stored procedures.[/color]
Re: looking for a good python module for MS SQL server
Jarek Zgoda wrote:[color=blue]
> Steve Holden napisa³(a):
>
>[color=green][color=darkred]
>>>>Does anyone know a good python mudule that works with MS SQL server?
>>>
>>>Google will yield something, but I prefer adodbapi over specialized
>>>modules. Works good with SQLServer using SSPI auth (others rather not).
>>>[/color]
>>
>>Though it does have problems with stored procedures.[/color]
>
>
> Didn't discover any of these.
>[/color]
Maybe things have changes since I last used adodbapi - can you actually
run stored procedures now?
Re: looking for a good python module for MS SQL server
Steve Holden napisa³(a):
[color=blue][color=green][color=darkred]
>>>>> Does anyone know a good python mudule that works with MS SQL server?
>>>>
>>>> Google will yield something, but I prefer adodbapi over specialized
>>>> modules. Works good with SQLServer using SSPI auth (others rather not).
>>>
>>> Though it does have problems with stored procedures.[/color]
>>
>> Didn't discover any of these.
>>[/color]
> Maybe things have changes since I last used adodbapi - can you actually
> run stored procedures now?[/color]
Things didn't change, as last update to adodbapi was long time ago... I
had no problems with stored procedures accessed using cursor's execute()
method (i.e. execute('exec sp_someproc, param')), but I never tried to
get any results, just call sp and commit or rollback.
Re: looking for a good python module for MS SQL server
Jarek Zgoda wrote:[color=blue]
> Steve Holden napisa³(a):
>
>[color=green][color=darkred]
>>>>>>Does anyone know a good python mudule that works with MS SQL server?
>>>>>
>>>>>Google will yield something, but I prefer adodbapi over specialized
>>>>>modules. Works good with SQLServer using SSPI auth (others rather not).
>>>>
>>>>Though it does have problems with stored procedures.
>>>
>>>Didn't discover any of these.
>>>[/color]
>>
>>Maybe things have changes since I last used adodbapi - can you actually
>>run stored procedures now?[/color]
>
>
> Things didn't change, as last update to adodbapi was long time ago... I
> had no problems with stored procedures accessed using cursor's execute()
> method (i.e. execute('exec sp_someproc, param')), but I never tried to
> get any results, just call sp and commit or rollback.
>[/color]
Thanks. The situation does remain unchanged, then.
Re: looking for a good python module for MS SQL server
On 11/1/05, Jarek Zgoda <jzgoda@o2.usun .pl> wrote:
[color=blue]
> Things didn't change, as last update to adodbapi was long time ago... I
> had no problems with stored procedures accessed using cursor's execute()
> method (i.e. execute('exec sp_someproc, param')), but I never tried to
> get any results, just call sp and commit or rollback.[/color]
Can the adodbapi module be used on a Linux/Mac client? If not, what's
the best choice for cross-platform connectivity to a Microsoft SQL
Server?
Re: looking for a good python module for MS SQL server
Peter Decker wrote:[color=blue]
> On 11/1/05, Jarek Zgoda <jzgoda@o2.usun .pl> wrote:
>[color=green]
> > Things didn't change, as last update to adodbapi was long time ago... I
> > had no problems with stored procedures accessed using cursor's execute()
> > method (i.e. execute('exec sp_someproc, param')), but I never tried to
> > get any results, just call sp and commit or rollback.[/color]
>
> Can the adodbapi module be used on a Linux/Mac client? If not, what's
> the best choice for cross-platform connectivity to a Microsoft SQL
> Server?
>
> --
>
> # p.d.[/color]
I preserved this link from a discussion about a year ago, as I may well
need it one day. I have not actually tried any of the suggestions.
Re: looking for a good python module for MS SQL server
Peter Decker napisa³(a):
[color=blue][color=green]
>>Things didn't change, as last update to adodbapi was long time ago... I
>>had no problems with stored procedures accessed using cursor's execute()
>>method (i.e. execute('exec sp_someproc, param')), but I never tried to
>>get any results, just call sp and commit or rollback.[/color]
>
> Can the adodbapi module be used on a Linux/Mac client? If not, what's
> the best choice for cross-platform connectivity to a Microsoft SQL
> Server?[/color]
Nope, adodbapi relies on COM/ActiveX subsystem, so it's not available
outside Windows.
PyMSSQL can use DB-LIB or FreeTDS, so it may have use also on
non-windows systems, see http://pymssql.sourceforge.net/ (didn't try
this one, though).
Comment