Example #1
0
def main():
    try:
        import Class
        global mssql
        mssql = Class.MSSQL()
    except Exception as e:
        print("Connect to the database unsuccessful:", e)
    else:
        print("Connect to the database successful!")
        return mssql
Example #2
0
def main(host, user, password, database, default_table='baum_test'):
    try:
        import Class
        global table_name
        table_name = default_table
        global mssql
        mssql = Class.MSSQL(host, user, password, database)
    except Exception as e:
        print("Connect to the database unsuccessful:", e)
    else:
        print("Connect to the database successful!")
        return mssql