inital = transfer git to git2
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import pyodbc
|
||||
|
||||
TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTM5MDgzMDksImp0aSI6IjZDREM2UjB4ZFh2Y0hMUzBmdTVUQnpjZ1lLZHNMOXdEIiwiaXNzIjoiaHR0cHM6XC9cL2NwLmhhbWZhaG1pLmlyIiwiZXhwIjoxNjk1MjA4MzA4LCJhdWQiOiJodHRwczpcL1wvY3AuaGFtZmFobWkuaXIiLCJkYXRhIjp7ImlkIjoyLCJmaXJzdF9uYW1lIjoiXHUwNjJkXHUwNjQ1XHUwNmNjXHUwNjJmIiwibGFzdF9uYW1lIjoiXHUwNjM1XHUwNjQxXHUwNjI3XHUwNmNjXHUwNmNjIiwiZW1haWwiOiJzYWZhZWkuaGFtaWRAZ21haWwuY29tIiwidXNlcm5hbWUiOiJoc2FmYWVpIiwidXNlcl9sZXZlbCI6Mn19.soDo9t8FtinMamONlivJFGEVRLHOtjBOg5gzt55QVzg"
|
||||
ACCEPT = "application/json"
|
||||
HEADERS = {"Authorization": TOKEN, "Accept": ACCEPT}
|
||||
|
||||
def create_cursor():
|
||||
server = "DESKTOP-ENVCI85"
|
||||
database = "AIPLawDCIT"
|
||||
username = "Mofid3"
|
||||
password = "12345"
|
||||
|
||||
# ENCRYPT defaults to yes starting in ODBC Driver SQL Server. It's good to always specify ENCRYPT=yes on the client side to avoid MITM attacks.
|
||||
cnxn = pyodbc.connect(
|
||||
"DRIVER={SQL Server};SERVER="
|
||||
+ server
|
||||
+ ";DATABASE="
|
||||
+ database
|
||||
+ ";Trusted_Connection=yes;UID="
|
||||
+ username
|
||||
+ ";PWD="
|
||||
+ password
|
||||
)
|
||||
# cnxn = pyodbc.connect('DSN=sqldsn;')
|
||||
cursor = cnxn.cursor()
|
||||
return cursor
|
||||
Reference in New Issue
Block a user