same
This commit is contained in:
@@ -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()
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1;customer1;fistName1;lastName1
|
||||||
|
2;customer2;fistName2;lastName2
|
||||||
|
3;customer3;fistName3;lastName3
|
||||||
|
4;customer4;fistName4;lastName4
|
||||||
|
5;customer5;fistName5;lastName5
|
||||||
|
Reference in New Issue
Block a user