No project description provided
Project description
Database Connection Library
This library provides two classes, ACCESSdbc
and SSMSdbc
, for connecting to Microsoft Access and SQL Server databases respectively.
Installation
pip install db_handler
Usage
Connecting to a Microsoft Access Database
from db_handler import ACCESSdbc
# Create an instance of ACCESSdbc
db = ACCESSdbc('path_to_your_database_file')
# Connect to the database
if db.connect():
# Execute a query and get the results
results = db.execute_query_return_results('SELECT * FROM your_table')
# Don't forget to disconnect when you're done
db.disconnect()
Connecting to a Microsoft SQL Server Database
from db_handler import SSMSdbc
# Create an instance of SSMSdbc
db = SSMSdbc('your_server', 'your_database', 'your_username', 'your_password')
# Connect to the database
if db.connect():
# Execute a query and get the results
results = db.execute_query_return_results('SELECT * FROM your_table')
# Don't forget to disconnect when you're done
db.disconnect()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
db_handler-0.2.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for db_handler-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dac4a46df30257d3a7590e8016d43bc61fbb381031a0466f5c2ce5c744ba73aa |
|
MD5 | 9b0ea76c58c5894f5a9f1220c0ef6f4f |
|
BLAKE2b-256 | 5ada36aff9c169c7c2e3aa6f7388eee6d37a5fd0460aef49c3781df2df60f2f5 |