this is a german Web-Mirror of PYTHON.ORG powered by Domainunion AG

Revision 11 as of 2010-07-16 04:34:32

Clear message

Microsoft SQL Server

URL

https://www.microsoft.com/sql/default.mspx

licence
commercial/proprietary software, although a free (gratis) edition "SQL Server 2008 R2 Express" is available
platforms
Windows 2000 and later

Pros

Cons


DB API 2.0 Drivers

adodbapi

URL

https://adodbapi.sourceforge.net/

SourceForge

https://sourceforge.net/projects/adodbapi

licence
LGPL
platforms
Windows only

pymssql

URL

https://code.google.com/p/pymssql/

licence
LGPL
platforms
Windows and Unix

mssql

URL

https://www.object-craft.com.au/projects/mssql/

licence
BSD
platforms
Windows

mxODBC

URL

https://www.egenix.com/

License
eGenix.com Commercial License
Platforms
Windows, Unix, Mac OSX, FreeBSD, Solaris

mxODBC requires an ODBC driver to talk to SQL Server. On Windows, this comes with SQL Server, on the other platforms, there are several commercial ODBC high quality drivers available. There's also a FreeTDS ODBC driver which is free.

Unicode is supported both for data and SQL statements. mxODBC supports both 32-bit and 64-bit platforms.

pyodbc

URL

https://code.google.com/p/pyodbc

License
MIT
Platforms
Windows, Linux, MacOS X, FreeBSD, Solaris, Any (source provided)
Python versions
2.4 - 2.6

Actively maintained Open Source project.

Precompiled binaries are available for Windows. RedHat Enterprise Linux, Centos, and Fedora have precompiled RPMs available in their Extras repositories.

Supports ANSI and Unicode data and SQL statements.

Has an extensive set of unit tests for SQL Server.

ODBC

It is possible to connect to an SQL Server database using ODBC, either the mxODBC driver or the one included with Win32all. However, this is not recommended - adodbapi is a better solution, in part because it supports unicode.

Comment: This is actually not true at all: ODBC is the native API used for SQL Server and does support Unicode all the way. In fact, ODBC is the preferred way of accessing SQL Server if you care for performance. Microsoft has just released the SQL Server Native Client which is an extended ODBC driver for SQL Server. ADO is just a layer on top of the ODBC interface and a lot slower as a result. See e.g. MS TechNet for a comparison of ODBC, OLE DB and ADO, or this cookbook entry.

Unable to edit the page? See the FrontPage for instructions.