initial commit

This commit is contained in:
Bartal Læarsson
2026-02-14 22:51:46 +00:00
commit e9e1e99a97
2 changed files with 37 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import pyodbc
try:
connection = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER=.;DATABASE=SampleDB;Trusted_Connection=yes')
cursor = connection.cursor()
print()
print("Successfully connected to SQL Server")
print()
cursor.close()
connection.close()
except pyodbc.Error as ex:
print()
print("exception: ", ex)
print("closing program")
print()
exit()
print()