Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
readme.txt93 linesDownload Raw Back to adodbapi
1Project
2-------
3adodbapi
4
5A Python DB-API 2.0 (PEP-249) module that makes it easy to use Microsoft ADO 
6for connecting with databases and other data sources
7using either CPython or IronPython.
8
9Home page: <http://sourceforge.net/projects/adodbapi>
10
11Features:
12* 100% DB-API 2.0 (PEP-249) compliant (including most extensions and recommendations).
13* Includes pyunit testcases that describe how to use the module.  
14* Fully implemented in Python. -- runs in Python 2.5+ Python 3.0+ and IronPython 2.6+
15* Licensed under the LGPL license, which means that it can be used freely even in commercial programs subject to certain restrictions. 
16* The user can choose between paramstyles: 'qmark' 'named' 'format' 'pyformat' 'dynamic'
17* Supports data retrieval by column name e.g.:
18  for row in myCurser.execute("select name,age from students"):
19     print("Student", row.name, "is", row.age, "years old.")
20* Supports user-definable system-to-Python data conversion functions (selected by ADO data type, or by column)
21
22Prerequisites:
23* C Python 2.7 or 3.5 or higher
24 and pywin32 (Mark Hammond's python for windows extensions.)
25or
26 Iron Python 2.7 or higher.  (works in IPy2.0 for all data types except BUFFER)
27
28Installation:
29* (C-Python on Windows): Install pywin32 ("pip install pywin32") which includes adodbapi.
30* (IronPython on Windows): Download adodbapi from http://sf.net/projects/adodbapi.  Unpack the zip.
31     Open a command window as an administrator. CD to the folder containing the unzipped files.
32     Run "setup.py install" using the IronPython of your choice.
33
34NOTE: ...........
35If you do not like the new default operation of returning Numeric columns as decimal.Decimal,
36you can select other options by the user defined conversion feature. 
37Try:
38        adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = adodbapi.apibase.cvtString
39or:
40        adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = adodbapi.apibase.cvtFloat
41or:
42        adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = write_your_own_convertion_function
43		............
44notes for 2.6.2:
45    The definitive source has been moved to https://github.com/mhammond/pywin32/tree/master/adodbapi.
46    Remote has proven too hard to configure and test with Pyro4. I am moving it to unsupported status
47    until I can change to a different connection method.
48whats new in version 2.6
49   A cursor.prepare() method and support for prepared SQL statements.
50   Lots of refactoring, especially of the Remote and Server modules (still to be treated as Beta code).
51   The quick start document 'quick_reference.odt' will export as a nice-looking pdf.
52   Added paramstyles 'pyformat' and 'dynamic'. If your 'paramstyle' is 'named' you _must_ pass a dictionary of
53      parameters to your .execute() method. If your 'paramstyle' is 'format' 'pyformat' or 'dynamic', you _may_
54      pass a dictionary of parameters -- provided your SQL operation string is formatted correctly.
55
56whats new in version 2.5
57   Remote module: (works on Linux!) allows a Windows computer to serve ADO databases via PyRO
58   Server module: PyRO server for ADO.  Run using a command like= C:>python -m adodbapi.server
59   (server has simple connection string macros: is64bit, getuser, sql_provider, auto_security)
60   Brief documentation included.  See adodbapi/examples folder adodbapi.rtf
61   New connection method conn.get_table_names() --> list of names of tables in database
62
63   Vastly refactored. Data conversion things have been moved to the new adodbapi.apibase module.
64   Many former module-level attributes are now class attributes. (Should be more thread-safe)
65   Connection objects are now context managers for transactions and will commit or rollback.
66   Cursor objects are context managers and will automatically close themselves.
67   Autocommit can be switched on and off.
68   Keyword and positional arguments on the connect() method work as documented in PEP 249.
69   Keyword arguments from the connect call can be formatted into the connection string.
70   New keyword arguments defined, such as: autocommit, paramstyle, remote_proxy, remote_port.
71  *** Breaking change: variantConversion lookups are simplified: the following will raise KeyError:
72         oldconverter=adodbapi.variantConversions[adodbapi.adoStringTypes]
73      Refactor as: oldconverter=adodbapi.variantConversions[adodbapi.adoStringTypes[0]]
74
75License
76-------
77LGPL, see http://www.opensource.org/licenses/lgpl-license.php
78
79Documentation
80-------------
81
82Look at adodbapi/quick_reference.md
83http://www.python.org/topics/database/DatabaseAPI-2.0.html
84read the examples in adodbapi/examples
85and look at the test cases in adodbapi/test directory.
86
87Mailing lists
88-------------
89The adodbapi mailing lists have been deactivated. Submit comments to the 
90pywin32 or IronPython mailing lists.
91  -- the bug tracker on sourceforge.net/projects/adodbapi may be checked, (infrequently).
92  -- please use: https://github.com/mhammond/pywin32/issues
93 
codekingpro/portable-devtools · Team Ai