Skip to content
Snippets Groups Projects
Commit 5442f370 authored by Chude, Chiamaka A (PG/T - Comp Sci & Elec Eng)'s avatar Chude, Chiamaka A (PG/T - Comp Sci & Elec Eng)
Browse files

Resolve merge conflicts

parent 2f376b4f
No related branches found
No related tags found
1 merge request!9Final commit for User Microservice. Added docker and docker compose files for...
import pyodbc
# Define your connection string
connection_string = "DRIVER=ODBC Driver 17 for SQL Server;SERVER=user-database,1433;DATABASE=User_Management;UID=sa;PWD=WebTechGroup3;"
def test_connection():
try:
# Attempt to connect to the database using the connection string
conn = pyodbc.connect(connection_string, timeout=30)
print("Connection successful!")
# Close the connection
conn.close()
except pyodbc.Error as e:
print(f"Connection failed: {e}")
if __name__ == "__main__":
test_connection()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment