mmxxOODDBBCC ODBC Database Interfacefor PythonVVVersion 3.3 eerrssiioonn 33..33
mxODBC - Python ODBC Database Interface 5.4 Thread Safety & Thread Friendliness ... 66 5.4.1 Connections and Curso
mxODBC - Python ODBC Database Interface null_ok [6] Returns 1 if the column can contain NULL values (which are returned as None in Python). The curs
5. mxODBC Overview SQL.CURSOR_STATIC The result set is made static by creating a static copy of the result set after opening the cursor. As a result,
mxODBC - Python ODBC Database Interface Backwards Compatibility Notice: Please note that mxODBC 3.2 used to set the default cursor type depending on w
5. mxODBC Overview PostgreSQL mxODBC defaults to forward only cursors, since the driver becomes unusable with other settings. IBM DB2 Just like MS S
mxODBC - Python ODBC Database Interface Setting the value has an immediate effect on subsequent cursor.fetch*() calls. mxODBC does not reset this attr
5. mxODBC Overview This makes it easy to define your own factory functions to programmatically define row classes based on the cursor.description or o
mxODBC - Python ODBC Database Interface cursor.rowfactory = RowFactory.ListRowFactory cursor.execute('select x, Y, z from mytable') row = cu
5. mxODBC Overview Factory created Row Classes and pickle Because of the way these row classes are dynamically created, they are by default not pick
mxODBC - Python ODBC Database Interface 5.10.1 One API for all Subpackages To make applications portable between ODBC database backends, each of these
6. mxODBC Connection Objects 6. mxODBC Connection Objects Connection objects provide the communication link between your Python application and the d
Contents 5.7.1 Database Schema Introspection... 76 5.7.2 Result Set Introspection...
mxODBC - Python ODBC Database Interface If you connect to the database through an ODBC manager, you should use the DriverConnect() API since this allo
6. mxODBC Connection Objects The DriverConnect() API is only available if the ODBC driver or ODBC driver manager supports this. It is available on al
mxODBC - Python ODBC Database Interface 6.4.2 Errors due to missing Transaction Support If you get an exception during connect telling you that the d
6. mxODBC Connection Objects Cursors also support the context manager API, so the above could be simplified even more to: with connection: with co
mxODBC - Python ODBC Database Interface # string db = mx.ODBC.Windows.DriverConnect('DSN=mydb;UID=uid;PWD=pwd') 6.7 Connection Object Method
6. mxODBC Connection Objects The method returns a tuple (integer, string) giving an integer decoding (in native integer byte order) of the first bytes
mxODBC - Python ODBC Database Interface .__enter__() Returns the connection itself. This method makes connection objects usable as context manager (to
6. mxODBC Connection Objects .cursortype Read/write attribute that sets the default ODBC cursor type for cursors created on this connection. Possible
mxODBC - Python ODBC Database Interface TUPLE_DATETIMEFORMAT Python tuples as defined in the Supported Data Types section. STRING_DATETIMEFORMAT Py
6. mxODBC Connection Objects The connection.encoding is used on connection related APIs and also passed to cursors created on the connection at creati
mxODBC - Python ODBC Database Interface 5.10 mxODBC Subpackages ... 85 5.10.1 One API for all Subp
mxODBC - Python ODBC Database Interface Example: 'SELECT * FROM MyTable WHERE A=? AND B=?' used with a parameter tuple (1, 2) would result i
6. mxODBC Connection Objects On input, Python 8-bit strings are passed to the ODBC driver as-is. Unicode objects are converted to Python 8-bit string
mxODBC - Python ODBC Database Interface type 'S1003' is raised whenever trying to read data from the database in this .stringformat mode. Y
6. mxODBC Connection Objects The DB-API 2.0 mandates that database warnings must raised as mx.ODBC.Warning exception, but mostly because at the time o
mxODBC - Python ODBC Database Interface 7. mxODBC Cursor Objects These objects represent a database cursor: an object which is used to manage the con
7. mxODBC Cursor Objects 7.2 Subpackage Support Cursor objects are supported by all subpackages included in mxODBC. The extent to which the functiona
mxODBC - Python ODBC Database Interface 7.5 Cursor Object Constructors Cursor objects are created using the connection method connection.cursor(). co
7. mxODBC Cursor Objects Depending on the current .paramstyle setting, parameters must be provided as sequence14 or mapping: 'qmark'(default
mxODBC - Python ODBC Database Interface If parametertypes are given, the method returns a tuple copy of the parameters sequence, with output and input
7. mxODBC Cursor Objects The number of rows to fetch per call is specified by the parameter. If it is not given, the cursor's .arraysize determin
Contents .setconnectoption(option, value)... 93 .__enter__()...
mxODBC - Python ODBC Database Interface Option Comment Returns an integer value: SQL.TRUE - column is auto-increment SQL.FALSE - column is not an aut
7. mxODBC Cursor Objects Option Comment SQL.DESC_TYPE_NAME Data source dependent type name of the result set column or an empty string if the value
mxODBC - Python ODBC Database Interface Option Comment SQL.ATTR_MAX_LENGTH Returns the length limit for fetching column data. Possible values: Any
7. mxODBC Cursor Objects .prepare(sqlcmd) Prepare a database operation (query or command) statement for later execution and set cursor.command. To lat
mxODBC - Python ODBC Database Interface .setcursoroption(option, value) Sets a cursor option to a new value. Only a subset of the possible option valu
7. mxODBC Cursor Objects Option Comment interpret them as case-sensitive SQL search patterns. Possible values: SQL.TRUE - case-insensitive identifers
mxODBC - Python ODBC Database Interface Some ODBC drivers do not support all of these methods or return unusable data. As a result, you should verify
7. mxODBC Cursor Objects Switching between Search Patterns and Identifier Matching Some ODBC drivers support adjusting the catalog method interface
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment COLUMN_NAME VARCHAR(128) not NULL Name of the column of the specified ta
7. mxODBC Cursor Objects Column Name Column Datatype Comment accept NULL values. REMARKS VARCHAR(254) May contain descriptive information about t
mxODBC - Python ODBC Database Interface 6.8.1 Additional Attributes ... 101 7.
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment otherwise. .columnprivileges(qualifier=None, owner=None, table=None, c
7. mxODBC Cursor Objects .foreignkeys(primary_qualifier=None, primary_owner=None, pimary_table=None, foreign_qualifier=None, foreign_owner=None, forei
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment the SQL operation is UPDATE: SQL.RESTRICT, SQL.NO_ACTION, SQL.CASCADE, S
7. mxODBC Cursor Objects Column Name Column Datatype Comment character. For numeric data types, this is either the total number of digits, or the t
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment SQL.LIKE_ONLY: if the data type can be used in a WHERE clause only with
7. mxODBC Cursor Objects Column Name Column Datatype Comment SQL_DATA_TYPE SMALLINT not NULL SQL data type. This column is the same as the DATA_TY
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment NULL ORDINAL_POSITION SMALLINT not NULL Column sequence number in the
7. mxODBC Cursor Objects Column Name Column Datatype Comment SQL.PT_PROCEDURE: The returned object is a procedure; that is, it does not have a retur
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment SQL.PARAM_OUTPUT: this parameter is an output parameter. SQL.RETURN_VAL
7. mxODBC Cursor Objects Column Name Column Datatype Comment For numeric data types, the database can return a NUM_PREC_RADIX of either 10 or 2. NU
Contents .setinputsizes(sizes) ... 113 .setoutputsize(size[, column]) ...
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment IS_NULLABLE VARCHAR(254) Contains the string "NO" if the colu
7. mxODBC Cursor Objects The method is useful to determine columns that can be used as to determine query columns that allow retrieving rows which hav
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment data types where scale is not applicable. PSEUDO_COLUMN SMALLINT Indic
7. mxODBC Cursor Objects Column Name Column Datatype Comment NON_UNIQUE SMALLINT Indicates whether the index prohibits duplicate values. Returns:
mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment CARDINALITY INTEGER If the TYPE column contains the value SQL.TABLE_ST
7. mxODBC Cursor Objects Column Name Column Comment Datatype TABLE_TYPE VARCHAR(128) Identifies the type given by the name in the TABLE_NAME column.
mxODBC - Python ODBC Database Interface 7.7 Cursor Object Attributes .arraysize This read/write attribute specifies the number of rows to fetch at a t
7. mxODBC Cursor Objects .connection Connection object on which the cursor operates. .converter Read-only access to the converter function set using t
mxODBC - Python ODBC Database Interface Supported Data Types and are available through the SQL singleton defined at module level. Please see section
7. mxODBC Cursor Objects these parameter locations using a positional mapping. Parameter values for a SQL statement must be specified as sequence, nor
mxODBC - Python ODBC Database Interface 7.7 Cursor Object Attributes... 134 .arraysize...
mxODBC - Python ODBC Database Interface .rowcount This read-only attribute specifies the number of rows that the last .execute*() produced (for DQL st
8. Data Types supported by mxODBC 8. Data Types supported by mxODBC mxODBC tries to maintain as much of the available information across the Python-
mxODBC - Python ODBC Database Interface statement with embedded literal parameters to a normalized form and then find that it already has an access pl
8. Data Types supported by mxODBC print cursor.fetchall() More information about the connection and cursor attribute .paramstyle is available in secti
mxODBC - Python ODBC Database Interface Please note that mxODBC will try to use SQL type binding if possible, but always falls back to Python type bin
8. Data Types supported by mxODBC 8.3 SQL Type Input Binding The following data types are used for SQL type input binding mode - cursor.bindmethod (i
mxODBC - Python ODBC Database Interface SQL Type Python Type Comments SQL.WLONGVARCHAR (TEXT, BLOB or LONG in SQL) stringified object Non-string obj
8. Data Types supported by mxODBC SQL Type Python Type Comments SQL.INTEGER, SQL.BIT converted to a Python integer the ODBC driver/manager, so exp
mxODBC - Python ODBC Database Interface SQL Type Python Type Comments with float second values which sometimes cannot be represented with full accur
8. Data Types supported by mxODBC 8.4 Python Type Input Binding The following mappings are used for input variables in Python type input binding mod
Contents 8.6 Output Type Converter Functions ...151 8.6.1 Converter Function Signatures...
mxODBC - Python ODBC Database Interface Python Type SQL Type Comments (signed long) driver/manager, so expect the usual truncations. Long Integer
8. Data Types supported by mxODBC Python Type SQL Type Comments Server 2008 introduced a date column type. datetime.time SQL.TIME Converts the da
mxODBC - Python ODBC Database Interface SQL Type Python Type Comments connection's encoding setting. SQL.WCHAR, SQL.WVARCHAR, SQL.WLONGVARCHAR
8. Data Types supported by mxODBC SQL Type Python Type Comments information. Default is to return DateTime instances. SQL.TIME DateTimeDelta insta
mxODBC - Python ODBC Database Interface 8.6.1 Converter Function Signatures You can modify this mapping on-the-fly by defining a cursor converter fun
8. Data Types supported by mxODBC 8.6.2 Adjusting/Querying the Converter Function Cursor objects will use the connection's .converter attribute
mxODBC - Python ODBC Database Interface 8.8 Unicode and String Data Encodings mxODBC also supports Unicode objects to interface with databases. As m
8. Data Types supported by mxODBC configured with Unicode support. It also supports SQL commands given as Unicode data. However, it does not handle Un
mxODBC - Python ODBC Database Interface 9. DB-API Type Objects and Constructors Since many database have problems recognizing some column's or p
9. DB-API Type Objects and Constructors TimeFromTicks(ticks) This function constructs an mxDateTime DateTimeDelta object holding a time value from th
mxODBC - Python ODBC Database Interface ProgrammingError ... 159 NotSupportedError ...
mxODBC - Python ODBC Database Interface 10. mxODBC Exceptions and Error Handling The mxODBC package and all its subpackages use the DB API 2.0 except
10. mxODBC Exceptions and Error Handling Error is a subclass of exceptions.StandardError. Warning Exception raised for important warnings like data t
mxODBC - Python ODBC Database Interface |__OperationalError |__IntegrityError |__InternalError |__ProgrammingError |__No
10. mxODBC Exceptions and Error Handling 10.4 Error Handlers If you want to provide your own error handler, e.g. to mask database warnings or debug co
mxODBC - Python ODBC Database Interface 10.4.2 Examples Here's an example of an error handler that allows to flexibly ignore warnings or only rec
10. mxODBC Exceptions and Error Handling 10.5 Warning Classes The Python DB-API 2.0 does not define a warning class hierarchy. At the time the DB-API
mxODBC - Python ODBC Database Interface These mx.ODBC constants are available for the .warningformat attribute: ERROR_WARNINGFORMAT (default) Report w
10. mxODBC Exceptions and Error Handling errorhandler=myerrorhandler) 165
mxODBC - Python ODBC Database Interface 11. mxODBC Functions mxODBC includes a few helper functions and generic APIs which aid in everyday ODBC databa
11. mxODBC Functions This function is only available for ODBC 3.x compatible managers and ODBC drivers. Note: The function allows setting environmen
Contents 12. mxODBC Globals and Constants ...168 12.1 Subpackage Globals and Constants...168 BIND_US
mxODBC - Python ODBC Database Interface 12. mxODBC Globals and Constants 12.1 Subpackage Globals and Constants Each mxODBC subpackage exports the fo
12. mxODBC Globals and Constants EIGHTBIT_STRINGFORMAT, MIXED_STRINGFORMAT, UNICODE_STRINGFORMAT, NATIVE_UNICODE_STRINGFORMAT Integer values which are
mxODBC - Python ODBC Database Interface If you need to specify your own SQLSTATE to exception class mappings, you can assign to this dictionary. Chang
13. mx.ODBC.Misc.RowFactory Module 13. mx.ODBC.Misc.RowFactory Module This module defines a set of factory functions which can be used together with c
mxODBC - Python ODBC Database Interface In addition to the sequence protocol, they also allow mapping access as well as named attribute access based o
14. mx.ODBC Driver/Manager Packages 14. mx.ODBC Driver/Manager Packages This section includes specific notes for preconfigured subpackages and setups.
mxODBC - Python ODBC Database Interface Windows Platforms mxODBC selects the subpackage by trying to import the available ODBC driver subpackages in
14. mx.ODBC Driver/Manager Packages 14.3.2 Supported Datatypes The subpackage defaults to SQL type binding mode (see the Datatypes section for detai
mxODBC - Python ODBC Database Interface • When interfacing to MySQL using the MySQL ODBC driver, we have observed problems with using Unicode stateme
14. mx.ODBC Driver/Manager Packages 14.5.1 Notes General Recommendations • Please always use the DriverConnect() API to connect to the data source
Copyright 1997-2000 by IKDS Marc-André Lemburg, Langenfeld Copyright 2000-2015 by eGenix.com GmbH, Langenfeld All ri
mxODBC - Python ODBC Database Interface 14. mx.ODBC Driver/Manager Packages... 173 14.1 Driver/Manager Subpackage Notes...
mxODBC - Python ODBC Database Interface Example: def debug_errorhandler(connection, cursor, errorclass, errorvalue): sys.stderr.write('debug_
14. mx.ODBC Driver/Manager Packages Threading • In unixODBC versions 2.3.0 and below, the ODBC manager used a little known odbc.ini setting called &
mxODBC - Python ODBC Database Interface eGenix.com provides binary subpackages for this ODBC driver manager only on Linux x86 and x64 platforms. If yo
14. mx.ODBC Driver/Manager Packages Since these setups caused a lot of support requests due to configuration problems and version mismatches between t
mxODBC - Python ODBC Database Interface 15. Hints & Links to other Resources 15.1 Running mxODBC from a CGI script ODBC drivers and managers a
15. Hints & Links to other Resources Since this affects not only mxODBC, but other Python C extensions as well, you may want to use a work-around
mxODBC - Python ODBC Database Interface Microsoft MDAC Site Microsoft is constantly developing new forms of database access. For a close up on what t
16. Examples 16. ExamplesHere is a very simple example of how to use mxODBC. More elaborate examples of using Python Database API compatible databas
mxODBC - Python ODBC Database Interface Note: When connecting to a database with transaction support, you should explicitly do a .rollback() or .comm
17. Testing the Database Connection 17. Testing the Database Connection The package includes a test script that checks some of the database's fe
Contents 15. Hints & Links to other Resources...182 15.1 Running mxODBC from a CGI script...182 15
mxODBC - Python ODBC Database Interface 18. mxODBC Package Structure This is the Python package structure setup when installing mxODBC: [ODBC]
19. Support 19. 19.1.1 SupporteGenix.com is provides commercial support for this package, including adapting it to special needs for use in custom
mxODBC - Python ODBC Database Interface 19.1.2 iODBC Driver Manager To enable ODBC level tracing, open the /etc/odbc.ini or ~/.odbc.ini file and add t
19. Support 19.1.5 Mac OS X ODBC Driver Manager Open the Mac OS X ODBC Administrator. This can be found under Applications/Utilities. Go to the Traci
mxODBC - Python ODBC Database Interface 20. History & ChangesPlease visit the change log on the mxODBC product page for a list of changes in the
21. Copyright & License 21. Copyright & License© 1997-2000, Copyright by IKDS Marc-André Lemburg; All Rights Reserved. mailto: [email protected]
mxODBC - Python ODBC Database Interface EGENIX.COM COMMERCIAL LICENSE AGREEMENT Version 1.3.0 1. Introduction This “License Agreement” is between eG
21. Copyright & License “Commercial Environment” refers to any application environment which is aimed at directly or indirectly generating profit.
mxODBC - Python ODBC Database Interface 5. Modifications Software modifications may only be distributed in form of patches to the original files conta
21. Copyright & License THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF; OR (II) ANY AMOUNTS IN EXCESS OF THE AGGREGATE AMOUNTS PAID TO EGENIX
mxODBC - Python ODBC Database Interface 21. Copyright & License ... 193
mxODBC - Python ODBC Database Interface 14. General Nothing in this License Agreement affects any statutory rights of consumers that cannot be waived
21. Copyright & License EGENIX.COM PROOF OF AUTHORIZATION 1 CPU License (Example) This is an example of a "Proof of Authorization" for
mxODBC - Python ODBC Database Interface 4. Proof This Proof of Authorization was issued by <name>, <title> Langenfeld, <date> Proof
21. Copyright & License EGENIX.COM PROOF OF AUTHORIZATION 1 Developer CPU License (Example) This is an example of a "Proof of Authorization&
mxODBC - Python ODBC Database Interface 7.2 Redistribution eGenix.com hereby authorizes Licensee to redistribute the Software bundled with a product d
21. Copyright & License 203
1. Introduction 1. Introduction mxODBC has proven to be the most stable and versatile ODBC interface available for Python. It has been in active use f
mxODBC - Python ODBC Database Interface 1.2 Features • Python Database API 2.0 Compliance: the mxODBC API is fully Python DB-API 2.0 compatible and i
1. Introduction o cursor.scroll() to scroll the cursor in result sets without actually fetching data. o cursor.prepare() to prepare SQL statements f
mxODBC - Python ODBC Database Interface • Highly Portable Codebase: in addition to the already supported platforms for mxODBC, eGenix.com provides cu
1. Introduction mx.ODBC.Manager prefers iODBC over unixODBC over DataDirect if more than one ODBC driver manager is installed. • You should setup at
mxODBC - Python ODBC Database Interface 2. Installation The mxODBC database package is distributed as add-on for the eGenix.com mx Base Distribution
2. Installation Please make sure that you download the right version for your Python installation. If you get import errors or notices of failed initi
Contents Contents 1. Introduction...1 1.1 Technical Overview...
mxODBC - Python ODBC Database Interface To find out which variant your Python version was compiled with, run the following command: python -c 'pr
2. Installation License Files In order to use mxODBC, you will need license files from eGenix.com. If you want to test the product before buying it,
mxODBC - Python ODBC Database Interface Note: Depending on your Python installation, you may need admin privileges on Windows to successfully complete
2. Installation 2.3 Installation using egg package archives We assume that you have already have setuptools and easy_install installed in your Python
mxODBC - Python ODBC Database Interface In both cases, the license files are sent to the email address you specified during the purchase process or fr
2. Installation Note that you may need to have admin or root privileges in order to successfully complete the following step, unless you are using a v
mxODBC - Python ODBC Database Interface 2.3.4 Uninstall Since setuptools doesn't provide an uninstall command you have to manually remove the in
2. Installation In both cases, the license files are sent to the email address you specified during the purchase process or from which you wrote the e
mxODBC - Python ODBC Database Interface Note that you may need to have admin or root privileges in order to successfully complete the following step,
2. Installation python setup.py uninstall Manual Uninstall If you no longer have the older installation package, just remove the site-packages/mx/OD
mxODBC - Python ODBC Database Interface Step 2 ... 10 Step 3
mxODBC - Python ODBC Database Interface 3. Access Databases using mxODBC mxODBC provides an easy to use way of accessing the ODBC API of ODBC manager
3. Access Databases using mxODBC • If you are running a 64-bit Python application, you will also have to have a 64-bit ODBC manager and ODBC driver i
mxODBC - Python ODBC Database Interface 3.2.2 Installing Windows ODBC Drivers Please consult the documentation of your database for ODBC driver insta
3. Access Databases using mxODBC ODBC.INI - ODBC Data Source Configuration This INI-file provides data source information using one INI-section per
mxODBC - Python ODBC Database Interface 3.2.5 Available Data Source Types (DSNs) There are three kinds of data sources that you can install on Window
3. Access Databases using mxODBC See the ODBC File Data Source documentation for more details. 3.2.6 DSN-less Connections If you don't want to bo
mxODBC - Python ODBC Database Interface 3.3 Accessing Databases from Unix mxODBC is often used to access databases across a network. A very typical u
3. Access Databases using mxODBC administrative overhead, eGenix has developed a general solution to the problem for Python applications, the client-s
mxODBC - Python ODBC Database Interface The GUI tools can typically be found in the System part of the menu. For more details description please see
3. Access Databases using mxODBC iODBC needs this section in the odbc.ini file. unixODBC in the odbcinst.ini file. More recent DataDirect ODBC manager
Contents 3.2.1 Looking for Windows ODBC Drivers ? ... 19 3.2.2 Installing Windows ODBC Drivers ...
mxODBC - Python ODBC Database Interface iODBC needs this section in the odbc.ini file. unixODBC in the odbcinst.ini file. More recent DataDirect ODBC
3. Access Databases using mxODBC Note that some driver manager do not support this environment variable: unixODBC and iODBC support the variable, the
mxODBC - Python ODBC Database Interface File Data Sources (File-DSN) File data sources are special in the sense that they store the data source conn
3. Access Databases using mxODBC you upgrade an ODBC driver to a newer version, you may have to change all DSN-less connection setups due to changes i
mxODBC - Python ODBC Database Interface 4. Accessing Popular Databases This section provides information on available ODBC drivers for various popula
4. Accessing Popular Databases Supports SQL Server 2005, 2008, 2008R2, 2012. This version no longer supports SQL Server 2000. • Microsoft SQL Server
mxODBC - Python ODBC Database Interface See http://msdn.microsoft.com/en-us/library/ms188635.aspx for details on the various formats and how to confi
4. Accessing Popular Databases Due to the way the SQL Server Native Client works, the data from the result sets is sent to the client before the data
mxODBC - Python ODBC Database Interface The new Microsoft SQL Server Native Client for Linux is a port of the SQL Server Native Client for Windows to
4. Accessing Popular Databases [ODBC Drivers] MSNativeClient = Installed [MSNativeClient] Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.17
mxODBC - Python ODBC Database Interface 3.3.6 Available Data Source Types (DSNs)...29 User Data Sour
mxODBC - Python ODBC Database Interface • Most other operations work as expected, but please note that the driver is still under heavy development in
4. Accessing Popular Databases [mssql] Driver = /usr/local/freetds/lib/libtdsodbc.so Description = MS SQL Server 2008 running on Monet Trace = 0 Serve
mxODBC - Python ODBC Database Interface mxODBC addresses this by defaulting to connection.timestampresolution = 1000000 for SQL Server 2005 and earlie
4. Accessing Popular Databases Access Violations If you are experiencing problems related to access violations, like e.g. ProgrammingError: ('37
mxODBC - Python ODBC Database Interface string. Please see this article for details: Service Principal Name (SPN) Support in Client Connections MS
4. Accessing Popular Databases 4.2 MS Access Database 4.2.1 Available ODBC Drivers MS Access ODBC Driver Tested with MDAC 2.8 SP1 Access ODBC drive
mxODBC - Python ODBC Database Interface Driver Notes • eGenix.com has had reports about memory leaks occurring with the Oracle driver when used in l
4. Accessing Popular Databases Driver = /opt/oracle/instantclient_11_2/libsqora.so.11.1 ServerName = oracle11gr2 # DSN driver options Application Attr
mxODBC - Python ODBC Database Interface 4.3.2 General Notes Oracle tnsnames.ora file When connecting to Oracle database you typically have to provide
4. Accessing Popular Databases IBM ODBC Driver for iSeries / AS/400 DB2 servers IBM has a Linux ODBC driver which makes this setup possible. See the
Contents Access Violations... 41 Distributed Transaction Managers...
mxODBC - Python ODBC Database Interface the environment variables. Without having these set, mxODBC will fail to load and give you a traceback: Trace
4. Accessing Popular Databases 4.5 Sybase ASE 4.5.1 Available ODBC Drivers Sybase ASE ODBC driver Homepage: http://www.sybase.com/ Tested with Sybas
mxODBC - Python ODBC Database Interface Since this is a bug in the ODBC driver, future ESDs may fix the issue. In any case, please carefully check for
4. Accessing Popular Databases EasySoft ODBC Driver for Sybase Homepage: http://www.easysoft.com/ OpenLink ODBC Driver for Sybase Homepage: http:/
mxODBC - Python ODBC Database Interface • Unicode data is supported. It works best with the NATIVE_UNICODE_STRINGFORMAT mode. You can also use the au
4. Accessing Popular Databases Actual Technologies Mac OS X ODBC Driver for PostgreSQL Homepage: http://www.actualtech.com/ When using the driver on
mxODBC - Python ODBC Database Interface • The MySQL ODBC driver does not always update the .rownumber to the correct value, especially when using .sc
4. Accessing Popular Databases Actual Technologies Mac OS X ODBC Driver for MySQL Homepage: http://www.actualtech.com/ When using the driver on Mac
mxODBC - Python ODBC Database Interface Driver = /usr/local/maxdb/lib/libsdbodbcw.so Description = MaxDB ODBC Driver • Edit your ~/.odbc.ini file an
4. Accessing Popular Databases Driver Notes • The mx.ODBC.DataDirect package is currently only available for Linux 32-bit and 64-bit systems. If yo
mxODBC - Python ODBC Database Interface Static vs. forward-only Cursors... 48 4.5 Sybase ASE...
mxODBC - Python ODBC Database Interface • Teradata has the tendency to return non-ordered result sets in random order. This is due to the way the dat
4. Accessing Popular Databases # SessionMode can be Teradata or ANSI SessionMode = # Cursor open checks StCheckLevel = 0 # Enable TCP_NODELAY ? TCPNoD
mxODBC - Python ODBC Database Interface Netezza and Unicode Unicode data exchange doesn't work well when using the Netezza driver with the Data
4. Accessing Popular Databases DataDirect ODBC Driver for Netezza Homepage: http://www.datadirect.com/ 4.11 Other Databases If you want to run mxO
mxODBC - Python ODBC Database Interface 4.11.5 Alternative solution: mxODBC Connect If you would like to connect to a database for which you don'
5. mxODBC Overview 5. mxODBC Overview mxODBC is structured as Python package to support interfaces to many different ODBC managers and drivers. Each o
mxODBC - Python ODBC Database Interface • db.setinputsizes() and db.setoutputsizes() are dummy functions; this is allowed by DB API 2.0. • The type
5. mxODBC Overview You also can access the MS ODBC online reference from the Microsoft MDAC web-site. Please note that not all ODBC drivers and datab
mxODBC - Python ODBC Database Interface 5.4 Thread Safety & Thread Friendliness mxODBC itself is written in a thread safe way. There are no modul
5. mxODBC Overview those cases where you would really back out of a certain modification, e.g. due to an unexpected error in your program. mxODBC tur
Contents Warnings when deleting/update more than one row at a time... 56 4.9 Teradata ...
mxODBC - Python ODBC Database Interface Some databases for which mxODBC provides special subpackages such as MySQL don't have transaction support
5. mxODBC Overview Results can be retrieved through output parameter, input/output parameters, or result sets. Depending on the database backend, it i
mxODBC - Python ODBC Database Interface The ODBC syntax for calling a stored procedure is as follows: {call procedure-name [([parameter][,[parameter]
5. mxODBC Overview parameters, parametertypes) The return value from the function will be passed back as first parameter.
mxODBC - Python ODBC Database Interface SQL.PARAM_INPUT The parameter is an input parameter. Output values are not allowed and may raise a database er
5. mxODBC Overview This generates a result set with column COLUMN_TYPE which has the needed information. Please see the documentation in section 7.6.1
mxODBC - Python ODBC Database Interface Especially for numeric data, this may both be inefficient and inconvenient, so it's better to pass in a v
5. mxODBC Overview SELECT @a * 3; Oracle Ref Cursors as Output Parameters Oracle has the concept of reference cursors, which provide a simila
mxODBC - Python ODBC Database Interface (a INTEGER, rs OUT refcursor) AS $$ BEGIN OPEN rs FOR SELECT a * 3;
5. mxODBC Overview Introspection via cursor.execute() In mxODBC this can be done right after executing a SQL statement using one of the cursor.execu
Commenti su questo manuale