473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

looking for a good python module for MS SQL server

Hi,
Does anyone know a good python mudule that works with MS SQL server?
Thanks,
Anat
Oct 31 '05 #1
12 2152
Anat napisa³(a):
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).

--
Jarek Zgoda
http://jpa.berlios.de/
Oct 31 '05 #2
I've had good results with adodbapi as well.

Nov 1 '05 #3
Jarek Zgoda wrote:
Anat napisa³(a):

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.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Nov 1 '05 #4
I successfully used mxODBC
(<http://www.egenix.com/files/python/mxODBC.html>)

Grig

Nov 1 '05 #5

Anat wrote:
Hi,
Does anyone know a good python mudule that works with MS SQL server?
Thanks,
Anat


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?

Thanks

Frank

Nov 1 '05 #6
Steve Holden napisa³(a):
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.

--
Jarek Zgoda
http://jpa.berlios.de/
Nov 1 '05 #7
Jarek Zgoda wrote:
Steve Holden napisa³(a):

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.

Maybe things have changes since I last used adodbapi - can you actually
run stored procedures now?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Nov 1 '05 #8
Steve Holden napisa³(a):
> 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.

Maybe things have changes since I last used adodbapi - can you actually
run stored procedures now?


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.

--
Jarek Zgoda
http://jpa.berlios.de/
Nov 1 '05 #9
Jarek Zgoda wrote:
Steve Holden napisa³(a):

>>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.


Maybe things have changes since I last used adodbapi - can you actually
run stored procedures now?

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.

Thanks. The situation does remain unchanged, then.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Nov 1 '05 #10
On 11/1/05, Jarek Zgoda <jz****@o2.usun.pl> wrote:
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.


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.
Nov 1 '05 #11

Peter Decker wrote:
On 11/1/05, Jarek Zgoda <jz****@o2.usun.pl> wrote:
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.


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.


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.

http://groups.google.co.za/group/com...6d5359c3c1b4bd

Frank

Nov 2 '05 #12
Peter Decker napisa³(a):
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.


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?


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).

--
Jarek Zgoda
http://jpa.berlios.de/
Nov 2 '05 #13

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

Similar topics

0
by: Ravi | last post by:
Hi, I'm looking for a Postgres connection Python module that has good support for the BYTEA type. By good support I mean that -it should have a function to escape the raw binary data as...
5
by: John Ladasky | last post by:
Hi, folks, At the beginning of 2003, I was a frustrated computer user, and lapsed programmer, with problems to solve that screamed for programming. Thanks to the Python language and community, I...
5
by: Mothra | last post by:
Hi All, I am the current author of the Astro-Sunrise perl module http://search.cpan.org/~rkhill/Astro-Sunrise-0.91/Sunrise.pm and was wondering if it would be worth while to convert it to...
17
by: Jacob Page | last post by:
I have created what I think may be a useful Python module, but I'd like to share it with the Python community to get feedback, i.e. if it's Pythonic. If it's considered useful by Pythonistas, I'll...
3
by: Mark Engstrom | last post by:
Does anyone have a recommendation on the best AJAX python module? Thanks, Mark
0
by: RJS | last post by:
I've begun a Python module to provide a complete interface to the Meade LX200 command set: http://rjs.org/Python/LX200.py and would like input from potential users or people interested in...
1
by: RayS | last post by:
I've begun a Python module to provide a complete interface to the Meade LX200 command set: http://rjs.org/Python/LX200.py and would like input from potential users or people interested in...
0
by: Chris Ortner | last post by:
Hi everyone, I am looking for a python module or something similar which makes use of the capabilities of the kernel module applesmc to provide support for the sudden motion sensor in Apple...
0
by: Gabriel Genellina | last post by:
En Thu, 10 Jul 2008 14:02:29 -0300, Bhagwat Kolde <bbkolde@gmail.com> escribi�: If it is a single Python module, you can put it anywhere in the Python path. A good place may be the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.