Skip to main content

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


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)

Uploaded Source

Built Distribution

db_handler-0.2.1-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page