Samples¶
Note
The samples db_print.py and db_table_names.py use the database \adodbapi\examples\test.mdb
Several small complete sample programs are included:
Todo
db_print_simple.pyis not in the examples directory. Should it be?is64bit.pyis not in the examples directory. Should it be?
db_print_simple.pyA simple as possible example. Opens a local
.mdb(ACCESS) datebase and reads rows from a table.- db_table_names.py
Opens the same database & prints out a list of the tables in it.
is64bit.pyA copy of the one in the package, just here for import convenience.
is64bit.Python() → bool
is64bit.os() → bool
\adodbapi\examples\test.mdbThe sample database for the examples. (Also copied into the test environment temporary folder when testing 64-bit Python programs. They cannot build
.mdbfiles.)- xls_write.py
Creates a simple Excel spreadsheet.
- xls_read.py
Read the above spreadsheet.
- db_print.py
The only smart program in the folder. By default, this does the same thing as
db_print_simple.py. However, it also looks for command line arguments. Type help to see the options.If you use
table_name=?it will print a list of the tables in the.mdb.filename=Xlets you open a different.mdb.