This commit is contained in:
Bartal Læarsson
2026-02-17 11:23:24 +00:00
parent 37c6d5ba66
commit 72176b2be0
2 changed files with 28 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import pyodbc
import csv
try:
connection = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER=.;DATABASE=SampleDB;Trusted_Connection=yes')
cursor = connection.cursor()
cursor.close()
connection.close()
except pyodbc.Error as ex:
print()
print("exception: ",ex)
cursor.close()
connection.close()
print()
exit()
print()