SAP DB:ODBC Guida di Installazione

Navigare online o scaricare Guida di Installazione per Software SAP DB:ODBC. SAP DB:ODBC Installation guide Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 225
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti

Sommario

Pagina 1 - ODBC Database Interface

mmxxOODDBBCC ODBC Database Interfacefor PythonVVVersion 3.3 eerrssiioonn 33..33

Pagina 2

mxODBC - Python ODBC Database Interface 5.4 Thread Safety & Thread Friendliness ... 66 5.4.1 Connections and Curso

Pagina 3 - Contents

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

Pagina 4

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,

Pagina 5

mxODBC - Python ODBC Database Interface Backwards Compatibility Notice: Please note that mxODBC 3.2 used to set the default cursor type depending on w

Pagina 6

5. mxODBC Overview PostgreSQL mxODBC defaults to forward only cursors, since the driver becomes unusable with other settings. IBM DB2 Just like MS S

Pagina 7

mxODBC - Python ODBC Database Interface Setting the value has an immediate effect on subsequent cursor.fetch*() calls. mxODBC does not reset this attr

Pagina 8

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

Pagina 9

mxODBC - Python ODBC Database Interface cursor.rowfactory = RowFactory.ListRowFactory cursor.execute('select x, Y, z from mytable') row = cu

Pagina 10

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

Pagina 11

mxODBC - Python ODBC Database Interface 5.10.1 One API for all Subpackages To make applications portable between ODBC database backends, each of these

Pagina 12

6. mxODBC Connection Objects 6. mxODBC Connection Objects Connection objects provide the communication link between your Python application and the d

Pagina 13

Contents 5.7.1 Database Schema Introspection... 76 5.7.2 Result Set Introspection...

Pagina 14

mxODBC - Python ODBC Database Interface If you connect to the database through an ODBC manager, you should use the DriverConnect() API since this allo

Pagina 15

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

Pagina 16

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

Pagina 17

6. mxODBC Connection Objects Cursors also support the context manager API, so the above could be simplified even more to: with connection: with co

Pagina 18

mxODBC - Python ODBC Database Interface # string db = mx.ODBC.Windows.DriverConnect('DSN=mydb;UID=uid;PWD=pwd') 6.7 Connection Object Method

Pagina 19

6. mxODBC Connection Objects The method returns a tuple (integer, string) giving an integer decoding (in native integer byte order) of the first bytes

Pagina 20

mxODBC - Python ODBC Database Interface .__enter__() Returns the connection itself. This method makes connection objects usable as context manager (to

Pagina 21

6. mxODBC Connection Objects .cursortype Read/write attribute that sets the default ODBC cursor type for cursors created on this connection. Possible

Pagina 22

mxODBC - Python ODBC Database Interface TUPLE_DATETIMEFORMAT Python tuples as defined in the Supported Data Types section. STRING_DATETIMEFORMAT Py

Pagina 23

6. mxODBC Connection Objects The connection.encoding is used on connection related APIs and also passed to cursors created on the connection at creati

Pagina 24 - 1.2 Features

mxODBC - Python ODBC Database Interface 5.10 mxODBC Subpackages ... 85 5.10.1 One API for all Subp

Pagina 25

mxODBC - Python ODBC Database Interface Example: 'SELECT * FROM MyTable WHERE A=? AND B=?' used with a parameter tuple (1, 2) would result i

Pagina 26 - 1.3 Requirements

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

Pagina 27 - Mac OS X

mxODBC - Python ODBC Database Interface type 'S1003' is raised whenever trying to read data from the database in this .stringformat mode. Y

Pagina 28 - 2. Installation

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

Pagina 29 - Python Build Version

mxODBC - Python ODBC Database Interface 7. mxODBC Cursor Objects These objects represent a database cursor: an object which is used to manage the con

Pagina 30 - 2.2.2 Before You Start

7. mxODBC Cursor Objects 7.2 Subpackage Support Cursor objects are supported by all subpackages included in mxODBC. The extent to which the functiona

Pagina 31 - Step 1

mxODBC - Python ODBC Database Interface 7.5 Cursor Object Constructors Cursor objects are created using the connection method connection.cursor(). co

Pagina 32 - 2.2.4 Uninstall

7. mxODBC Cursor Objects Depending on the current .paramstyle setting, parameters must be provided as sequence14 or mapping: 'qmark'(default

Pagina 33 - 2.3.2 Before You Start

mxODBC - Python ODBC Database Interface If parametertypes are given, the method returns a tuple copy of the parameters sequence, with output and input

Pagina 34 - Step 2

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

Pagina 35 - Step 4

Contents .setconnectoption(option, value)... 93 .__enter__()...

Pagina 36 - 2.3.4 Uninstall

mxODBC - Python ODBC Database Interface Option Comment Returns an integer value: SQL.TRUE - column is auto-increment SQL.FALSE - column is not an aut

Pagina 37

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

Pagina 38 - 2.4.3 Uninstall

mxODBC - Python ODBC Database Interface Option Comment SQL.ATTR_MAX_LENGTH Returns the length limit for fetching column data. Possible values: Any

Pagina 39 - Manual Uninstall

7. mxODBC Cursor Objects .prepare(sqlcmd) Prepare a database operation (query or command) statement for later execution and set cursor.command. To lat

Pagina 40 - 3.1 ODBC Application Stack

mxODBC - Python ODBC Database Interface .setcursoroption(option, value) Sets a cursor option to a new value. Only a subset of the possible option valu

Pagina 41

7. mxODBC Cursor Objects Option Comment interpret them as case-sensitive SQL search patterns. Possible values: SQL.TRUE - case-insensitive identifers

Pagina 42 - [Microsoft][ODBC Driver

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

Pagina 43 - Windows Registry Keys

7. mxODBC Cursor Objects Switching between Search Patterns and Identifier Matching Some ODBC drivers support adjusting the catalog method interface

Pagina 44

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment COLUMN_NAME VARCHAR(128) not NULL Name of the column of the specified ta

Pagina 45 - 3.2.6 DSN-less Connections

7. mxODBC Cursor Objects Column Name Column Datatype Comment accept NULL values. REMARKS VARCHAR(254) May contain descriptive information about t

Pagina 46

mxODBC - Python ODBC Database Interface 6.8.1 Additional Attributes ... 101 7.

Pagina 47

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment otherwise. .columnprivileges(qualifier=None, owner=None, table=None, c

Pagina 48

7. mxODBC Cursor Objects .foreignkeys(primary_qualifier=None, primary_owner=None, pimary_table=None, foreign_qualifier=None, foreign_owner=None, forei

Pagina 49 - [ODBC Data Sources]

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment the SQL operation is UPDATE: SQL.RESTRICT, SQL.NO_ACTION, SQL.CASCADE, S

Pagina 50 - ODBCINSTINI

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

Pagina 51

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

Pagina 52 - 3.3.7 DSN-less Connections

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

Pagina 53 - DNS-less Connection String

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment NULL ORDINAL_POSITION SMALLINT not NULL Column sequence number in the

Pagina 54 - 4.1 MS SQL Server

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

Pagina 55

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment SQL.PARAM_OUTPUT: this parameter is an output parameter. SQL.RETURN_VAL

Pagina 56

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

Pagina 57

Contents .setinputsizes(sizes) ... 113 .setoutputsize(size[, column]) ...

Pagina 58 - Driver Limitations

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment IS_NULLABLE VARCHAR(254) Contains the string "NO" if the colu

Pagina 59

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

Pagina 60 - [MONET]

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment data types where scale is not applicable. PSEUDO_COLUMN SMALLINT Indic

Pagina 61 - 4.1.2 General Notes

7. mxODBC Cursor Objects Column Name Column Datatype Comment NON_UNIQUE SMALLINT Indicates whether the index prohibits duplicate values. Returns:

Pagina 62

mxODBC - Python ODBC Database Interface Column Name Column Datatype Comment CARDINALITY INTEGER If the TYPE column contains the value SQL.TABLE_ST

Pagina 63 - Access Violations

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.

Pagina 64 - Kerberos on Linux

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

Pagina 65 - 4.3 Oracle

7. mxODBC Cursor Objects .connection Connection object on which the cursor operates. .converter Read-only access to the converter function set using t

Pagina 66 - Driver Notes

mxODBC - Python ODBC Database Interface Supported Data Types and are available through the SQL singleton defined at module level. Please see section

Pagina 67

7. mxODBC Cursor Objects these parameter locations using a positional mapping. Parameter values for a SQL statement must be specified as sequence, nor

Pagina 68 - 4.4 IBM DB2

mxODBC - Python ODBC Database Interface 7.7 Cursor Object Attributes... 134 .arraysize...

Pagina 69 - 4.4.2 General Notes

mxODBC - Python ODBC Database Interface .rowcount This read-only attribute specifies the number of rows that the last .execute*() produced (for DQL st

Pagina 70 - Linker Paths

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-

Pagina 71 - 4.5 Sybase ASE

mxODBC - Python ODBC Database Interface statement with embedded literal parameters to a normalized form and then find that it already has an access pl

Pagina 72

8. Data Types supported by mxODBC print cursor.fetchall() More information about the connection and cursor attribute .paramstyle is available in secti

Pagina 73 - 4.6 PostgreSQL

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

Pagina 74

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

Pagina 75 - 4.7 MySQL

mxODBC - Python ODBC Database Interface SQL Type Python Type Comments SQL.WLONGVARCHAR (TEXT, BLOB or LONG in SQL) stringified object Non-string obj

Pagina 76 - .rownumber

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

Pagina 77 - 4.8 SAP MaxDB / SAPDB

mxODBC - Python ODBC Database Interface SQL Type Python Type Comments with float second values which sometimes cannot be represented with full accur

Pagina 78 - 4.9 Teradata

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

Pagina 79

Contents 8.6 Output Type Converter Functions ...151 8.6.1 Converter Function Signatures...

Pagina 80 - ORDER BY clause to

mxODBC - Python ODBC Database Interface Python Type SQL Type Comments (signed long) driver/manager, so expect the usual truncations. Long Integer

Pagina 81 - 4.10 Netezza

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

Pagina 82 - Netezza and Unicode

mxODBC - Python ODBC Database Interface SQL Type Python Type Comments connection's encoding setting. SQL.WCHAR, SQL.WVARCHAR, SQL.WLONGVARCHAR

Pagina 83 - 4.11 Other Databases

8. Data Types supported by mxODBC SQL Type Python Type Comments information. Default is to return DateTime instances. SQL.TIME DateTimeDelta insta

Pagina 84

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

Pagina 85 - 5. mxODBC Overview

8. Data Types supported by mxODBC 8.6.2 Adjusting/Querying the Converter Function Cursor objects will use the connection's .converter attribute

Pagina 86 - 5.1.2 Extensions

mxODBC - Python ODBC Database Interface 8.8 Unicode and String Data Encodings mxODBC also supports Unicode objects to interface with databases. As m

Pagina 87 - 5.3 Supported ODBC Versions

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

Pagina 88 - 5.5 Transaction Support

mxODBC - Python ODBC Database Interface 9. DB-API Type Objects and Constructors Since many database have problems recognizing some column's or p

Pagina 89 - 5.5.2 Manual Commit

9. DB-API Type Objects and Constructors TimeFromTicks(ticks) This function constructs an mxDateTime DateTimeDelta object holding a time value from th

Pagina 90 - 5.6 Stored Procedures

mxODBC - Python ODBC Database Interface ProgrammingError ... 159 NotSupportedError ...

Pagina 91 - Methods

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

Pagina 92

10. mxODBC Exceptions and Error Handling Error is a subclass of exceptions.StandardError. Warning Exception raised for important warnings like data t

Pagina 93 - parametertypes Parameter

mxODBC - Python ODBC Database Interface |__OperationalError |__IntegrityError |__InternalError |__ProgrammingError |__No

Pagina 94

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

Pagina 95

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

Pagina 96

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

Pagina 97

mxODBC - Python ODBC Database Interface These mx.ODBC constants are available for the .warningformat attribute: ERROR_WARNINGFORMAT (default) Report w

Pagina 98 - 5.7 Introspection

10. mxODBC Exceptions and Error Handling errorhandler=myerrorhandler) 165

Pagina 99

mxODBC - Python ODBC Database Interface 11. mxODBC Functions mxODBC includes a few helper functions and generic APIs which aid in everyday ODBC databa

Pagina 100 - 5.8 ODBC Cursor Types

11. mxODBC Functions This function is only available for ODBC 3.x compatible managers and ODBC drivers. Note: The function allows setting environmen

Pagina 101 - 5.8.2 Default Cursor Type

Contents 12. mxODBC Globals and Constants ...168 12.1 Subpackage Globals and Constants...168 BIND_US

Pagina 102 - Oracle

mxODBC - Python ODBC Database Interface 12. mxODBC Globals and Constants 12.1 Subpackage Globals and Constants Each mxODBC subpackage exports the fo

Pagina 103 - Factory Functions

12. mxODBC Globals and Constants EIGHTBIT_STRINGFORMAT, MIXED_STRINGFORMAT, UNICODE_STRINGFORMAT, NATIVE_UNICODE_STRINGFORMAT Integer values which are

Pagina 104

mxODBC - Python ODBC Database Interface If you need to specify your own SQLSTATE to exception class mappings, you can assign to this dictionary. Chang

Pagina 105 - Predefined Row Factories

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

Pagina 106

mxODBC - Python ODBC Database Interface In addition to the sequence protocol, they also allow mapping access as well as named attribute access based o

Pagina 107 - 5.10 mxODBC Subpackages

14. mx.ODBC Driver/Manager Packages 14. mx.ODBC Driver/Manager Packages This section includes specific notes for preconfigured subpackages and setups.

Pagina 108

mxODBC - Python ODBC Database Interface Windows Platforms mxODBC selects the subpackage by trying to import the available ODBC driver subpackages in

Pagina 109 - 6.1 Subpackage Support

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

Pagina 110

mxODBC - Python ODBC Database Interface • When interfacing to MySQL using the MySQL ODBC driver, we have observed problems with using Unicode stateme

Pagina 111

14. mx.ODBC Driver/Manager Packages 14.5.1 Notes General Recommendations • Please always use the DriverConnect() API to connect to the data source

Pagina 112

Copyright  1997-2000 by IKDS Marc-André Lemburg, Langenfeld Copyright  2000-2015 by eGenix.com GmbH, Langenfeld All ri

Pagina 113 - 6.6 Unicode/ANSI Connections

mxODBC - Python ODBC Database Interface 14. mx.ODBC Driver/Manager Packages... 173 14.1 Driver/Manager Subpackage Notes...

Pagina 114 - # string

mxODBC - Python ODBC Database Interface Example: def debug_errorhandler(connection, cursor, errorclass, errorvalue): sys.stderr.write('debug_

Pagina 115

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 &

Pagina 116

mxODBC - Python ODBC Database Interface eGenix.com provides binary subpackages for this ODBC driver manager only on Linux x86 and x64 platforms. If yo

Pagina 117

14. mx.ODBC Driver/Manager Packages Since these setups caused a lot of support requests due to configuration problems and version mismatches between t

Pagina 118

mxODBC - Python ODBC Database Interface 15. Hints & Links to other Resources 15.1 Running mxODBC from a CGI script ODBC drivers and managers a

Pagina 119

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

Pagina 120

mxODBC - Python ODBC Database Interface Microsoft MDAC Site Microsoft is constantly developing new forms of database access. For a close up on what t

Pagina 121

16. Examples 16. ExamplesHere is a very simple example of how to use mxODBC. More elaborate examples of using Python Database API compatible databas

Pagina 122

mxODBC - Python ODBC Database Interface Note: When connecting to a database with transaction support, you should explicitly do a .rollback() or .comm

Pagina 123

17. Testing the Database Connection 17. Testing the Database Connection The package includes a test script that checks some of the database's fe

Pagina 124 - 7. mxODBC Cursor Objects

Contents 15. Hints & Links to other Resources...182 15.1 Running mxODBC from a CGI script...182 15

Pagina 125 - 7.4 Cursor Type Object

mxODBC - Python ODBC Database Interface 18. mxODBC Package Structure This is the Python package structure setup when installing mxODBC: [ODBC]

Pagina 126 - 7.6 Cursor Object Methods

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

Pagina 127

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

Pagina 128

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

Pagina 129

mxODBC - Python ODBC Database Interface 20. History & ChangesPlease visit the change log on the mxODBC product page for a list of changes in the

Pagina 130

21. Copyright & License 21. Copyright & License© 1997-2000, Copyright by IKDS Marc-André Lemburg; All Rights Reserved. mailto: [email protected]

Pagina 131

mxODBC - Python ODBC Database Interface EGENIX.COM COMMERCIAL LICENSE AGREEMENT Version 1.3.0 1. Introduction This “License Agreement” is between eG

Pagina 132

21. Copyright & License “Commercial Environment” refers to any application environment which is aimed at directly or indirectly generating profit.

Pagina 133

mxODBC - Python ODBC Database Interface 5. Modifications Software modifications may only be distributed in form of patches to the original files conta

Pagina 134

21. Copyright & License THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF; OR (II) ANY AMOUNTS IN EXCESS OF THE AGGREGATE AMOUNTS PAID TO EGENIX

Pagina 135 - 7.6.1 Catalog Methods

mxODBC - Python ODBC Database Interface 21. Copyright & License ... 193

Pagina 136 - Search Pattern Parameters

mxODBC - Python ODBC Database Interface 14. General Nothing in this License Agreement affects any statutory rights of consumers that cannot be waived

Pagina 137 - Available Catalog Methods

21. Copyright & License EGENIX.COM PROOF OF AUTHORIZATION 1 CPU License (Example) This is an example of a "Proof of Authorization" for

Pagina 138 - SQLGetData() and

mxODBC - Python ODBC Database Interface 4. Proof This Proof of Authorization was issued by <name>, <title> Langenfeld, <date> Proof

Pagina 139 - 7. mxODBC Cursor Objects

21. Copyright & License EGENIX.COM PROOF OF AUTHORIZATION 1 Developer CPU License (Example) This is an example of a "Proof of Authorization&

Pagina 140

mxODBC - Python ODBC Database Interface 7.2 Redistribution eGenix.com hereby authorizes Licensee to redistribute the Software bundled with a product d

Pagina 141

21. Copyright & License 203

Pagina 142 - .gettypeinfo(sqltype)

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

Pagina 143

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

Pagina 144

1. Introduction o cursor.scroll() to scroll the cursor in result sets without actually fetching data. o cursor.prepare() to prepare SQL statements f

Pagina 145

mxODBC - Python ODBC Database Interface • Highly Portable Codebase: in addition to the already supported platforms for mxODBC, eGenix.com provides cu

Pagina 146

1. Introduction mx.ODBC.Manager prefers iODBC over unixODBC over DataDirect if more than one ODBC driver manager is installed. • You should setup at

Pagina 147

mxODBC - Python ODBC Database Interface 2. Installation The mxODBC database package is distributed as add-on for the eGenix.com mx Base Distribution

Pagina 148

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

Pagina 149

Contents Contents 1. Introduction...1 1.1 Technical Overview...

Pagina 150

mxODBC - Python ODBC Database Interface To find out which variant your Python version was compiled with, run the following command: python -c 'pr

Pagina 151

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,

Pagina 152

mxODBC - Python ODBC Database Interface Note: Depending on your Python installation, you may need admin privileges on Windows to successfully complete

Pagina 153

2. Installation 2.3 Installation using egg package archives We assume that you have already have setuptools and easy_install installed in your Python

Pagina 154

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

Pagina 155

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

Pagina 156 - 7.7 Cursor Object Attributes

mxODBC - Python ODBC Database Interface 2.3.4 Uninstall Since setuptools doesn't provide an uninstall command you have to manually remove the in

Pagina 157

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

Pagina 158

mxODBC - Python ODBC Database Interface Note that you may need to have admin or root privileges in order to successfully complete the following step,

Pagina 159

2. Installation python setup.py uninstall Manual Uninstall If you no longer have the older installation package, just remove the site-packages/mx/OD

Pagina 160

mxODBC - Python ODBC Database Interface Step 2 ... 10 Step 3

Pagina 161

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

Pagina 162

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

Pagina 163

mxODBC - Python ODBC Database Interface 3.2.2 Installing Windows ODBC Drivers Please consult the documentation of your database for ODBC driver insta

Pagina 164 - Per-Statement Binding Mode

3. Access Databases using mxODBC ODBC.INI - ODBC Data Source Configuration This INI-file provides data source information using one INI-section per

Pagina 165 - 8.3 SQL Type Input Binding

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

Pagina 166 - UNICODE_STRINGFORMAT

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

Pagina 167

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

Pagina 168 - None singleton is

3. Access Databases using mxODBC administrative overhead, eGenix has developed a general solution to the problem for Python applications, the client-s

Pagina 169

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

Pagina 170

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

Pagina 171 - 8.5 Output Conversions

Contents 3.2.1 Looking for Windows ODBC Drivers ? ... 19 3.2.2 Installing Windows ODBC Drivers ...

Pagina 172 - EIGHTBIT_STRINGFORMAT

mxODBC - Python ODBC Database Interface iODBC needs this section in the odbc.ini file. unixODBC in the odbcinst.ini file. More recent DataDirect ODBC

Pagina 173

3. Access Databases using mxODBC Note that some driver manager do not support this environment variable: unixODBC and iODBC support the variable, the

Pagina 174

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

Pagina 175 - 8.7 Auto-Conversions

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

Pagina 176

mxODBC - Python ODBC Database Interface 4. Accessing Popular Databases This section provides information on available ODBC drivers for various popula

Pagina 177 - 8.9 Additional Comments

4. Accessing Popular Databases Supports SQL Server 2005, 2008, 2008R2, 2012. This version no longer supports SQL Server 2000. • Microsoft SQL Server

Pagina 178

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

Pagina 179

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

Pagina 180 - Handling

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

Pagina 181

4. Accessing Popular Databases [ODBC Drivers] MSNativeClient = Installed [MSNativeClient] Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.17

Pagina 182 - 10.2 SQL Error Mappings

mxODBC - Python ODBC Database Interface 3.3.6 Available Data Source Types (DSNs)...29 User Data Sour

Pagina 183 - 10.4 Error Handlers

mxODBC - Python ODBC Database Interface • Most other operations work as expected, but please note that the driver is still under heavy development in

Pagina 184 - 10.4.2 Examples

4. Accessing Popular Databases [mssql] Driver = /usr/local/freetds/lib/libtdsodbc.so Description = MS SQL Server 2008 running on Monet Trace = 0 Serve

Pagina 185 - 10.6 Database Warnings

mxODBC - Python ODBC Database Interface mxODBC addresses this by defaulting to connection.timestampresolution = 1000000 for SQL Server 2005 and earlie

Pagina 186

4. Accessing Popular Databases Access Violations If you are experiencing problems related to access violations, like e.g. ProgrammingError: ('37

Pagina 187

mxODBC - Python ODBC Database Interface string. Please see this article for details: Service Principal Name (SPN) Support in Client Connections MS

Pagina 188 - 11. mxODBC Functions

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

Pagina 189 - 11.2 mx.ODBC Functions

mxODBC - Python ODBC Database Interface Driver Notes • eGenix.com has had reports about memory leaks occurring with the Oracle driver when used in l

Pagina 190

4. Accessing Popular Databases Driver = /opt/oracle/instantclient_11_2/libsqora.so.11.1 ServerName = oracle11gr2 # DSN driver options Application Attr

Pagina 191

mxODBC - Python ODBC Database Interface 4.3.2 General Notes Oracle tnsnames.ora file When connecting to Oracle database you typically have to provide

Pagina 192

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

Pagina 193 - Functions

Contents Access Violations... 41 Distributed Transaction Managers...

Pagina 194

mxODBC - Python ODBC Database Interface the environment variables. Without having these set, mxODBC will fail to load and give you a traceback: Trace

Pagina 195 - Driver Manager

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

Pagina 196

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

Pagina 197 - Manager

4. Accessing Popular Databases EasySoft ODBC Driver for Sybase Homepage: http://www.easysoft.com/ OpenLink ODBC Driver for Sybase Homepage: http:/

Pagina 198

mxODBC - Python ODBC Database Interface • Unicode data is supported. It works best with the NATIVE_UNICODE_STRINGFORMAT mode. You can also use the au

Pagina 199 - 14.5.1 Notes

4. Accessing Popular Databases Actual Technologies Mac OS X ODBC Driver for PostgreSQL Homepage: http://www.actualtech.com/ When using the driver on

Pagina 200 - 64-bit Platforms

mxODBC - Python ODBC Database Interface • The MySQL ODBC driver does not always update the .rownumber to the correct value, especially when using .sc

Pagina 201

4. Accessing Popular Databases Actual Technologies Mac OS X ODBC Driver for MySQL Homepage: http://www.actualtech.com/ When using the driver on Mac

Pagina 202 - 14.7 ODBC Driver Subpackages

mxODBC - Python ODBC Database Interface Driver = /usr/local/maxdb/lib/libsdbodbcw.so Description = MaxDB ODBC Driver • Edit your ~/.odbc.ini file an

Pagina 203

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

Pagina 204 - Running mxODBC with mod_wsgi

mxODBC - Python ODBC Database Interface Static vs. forward-only Cursors... 48 4.5 Sybase ASE...

Pagina 205 - Freezing mxODBC using py2exe

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

Pagina 206

4. Accessing Popular Databases # SessionMode can be Teradata or ANSI SessionMode = # Cursor open checks StCheckLevel = 0 # Enable TCP_NODELAY ? TCPNoD

Pagina 207 - 16. Examples

mxODBC - Python ODBC Database Interface Netezza and Unicode Unicode data exchange doesn't work well when using the Netezza driver with the Data

Pagina 208

4. Accessing Popular Databases DataDirect ODBC Driver for Netezza Homepage: http://www.datadirect.com/ 4.11 Other Databases If you want to run mxO

Pagina 209

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'

Pagina 210 - 18. mxODBC Package Structure

5. mxODBC Overview 5. mxODBC Overview mxODBC is structured as Python package to support interfaces to many different ODBC managers and drivers. Each o

Pagina 211 - Windows ODBC Manager

mxODBC - Python ODBC Database Interface • db.setinputsizes() and db.setoutputsizes() are dummy functions; this is allowed by DB API 2.0. • The type

Pagina 212 - 19.1.2 iODBC Driver Manager

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

Pagina 213

mxODBC - Python ODBC Database Interface 5.4 Thread Safety & Thread Friendliness mxODBC itself is written in a thread safe way. There are no modul

Pagina 214 - 20. History & Changes

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

Pagina 215 - 21. Copyright & License

Contents Warnings when deleting/update more than one row at a time... 56 4.9 Teradata ...

Pagina 216 - 2. Terms and Definitions

mxODBC - Python ODBC Database Interface Some databases for which mxODBC provides special subpackages such as MySQL don't have transaction support

Pagina 217 - 4. Authorizations

5. mxODBC Overview Results can be retrieved through output parameter, input/output parameters, or result sets. Depending on the database backend, it i

Pagina 218 - 9. LIMITATION OF LIABILITY

mxODBC - Python ODBC Database Interface The ODBC syntax for calling a stored procedure is as follows: {call procedure-name [([parameter][,[parameter]

Pagina 219 - 13. High Risk Activities

5. mxODBC Overview parameters, parametertypes) The return value from the function will be passed back as first parameter.

Pagina 220 - 15. Agreement

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

Pagina 221 - 3. Authorizations

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

Pagina 222 - 4. Proof

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

Pagina 223

5. mxODBC Overview SELECT @a * 3; Oracle Ref Cursors as Output Parameters Oracle has the concept of reference cursors, which provide a simila

Pagina 224 - 8. Proof

mxODBC - Python ODBC Database Interface (a INTEGER, rs OUT refcursor) AS $$ BEGIN OPEN rs FOR SELECT a * 3;

Pagina 225 - 21. Copyright & License

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

Nessun commento