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.0.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for db_handler-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92bc390eecaf388a573f74c349e9dc3b0e153189d1e7dce0c9fd2aea3600bb27 |
|
MD5 | 64ee670e4ee74b6e521326fdabbefb71 |
|
BLAKE2b-256 | acc97f780d35075f80e92cc8c885350b64a23dd442afdef7e699794c7f64e83b |