반응형 MS-SQL3 초간단 소스 ODBC Driver Adapter Connect Test python MS-SQL Database ============================================================ import pyodbc conn = pyodbc.connect('DRIVER=FreeTDS;SERVER=192.168.0.146;PORT=1433;DATABASE=ShopDB;UID=Wowcat;PWD=cocoon115;') cursor = conn.cursor() cursor.execute("SELECT @@version;") row = cursor.fetchone() while row: print(row[0]) row = cursor.fetchone() ============================================================ =================.. 2021. 10. 6. 초간단 소스 MS-SQL Driver Connect Adapter Test python Database ============================================================ import pymssql Ip = '192.168.0.146' Port = '1433' DB = 'ShopDB' ID = 'Wowcat' PW = 'cocoon115' conn = pymssql.connect( server=Ip, database=DB, user=ID, password=PW ) cursor = conn.cursor() cursor.execute("SELECT @@version;") row = cursor.fetchone() while row: print(row[0]) row = cursor.fetchone() =======================================.. 2021. 10. 6. DB Adapter Installation : MS-SQL, ODBC Driver in Raspberry pi Database python ============================================================ 1. command ============================================================ apt-get install freetds-dev apt-get install freetds-bin apt-get install unixodbc-dev apt-get install tdsodbc ============================================================ ============================================================ 2. command =======================.. 2021. 10. 6. 이전 1 다음 728x90 반응형