car_deal_util/code/python/车商渠道数据采集/DataManagement/CarDealer.py

26 lines
453 B
Python

import sys;
import cx_Oracle;
def getConnectString( user_name, password, db_name ):
return userName + "/" + password + "@" + dbName
sql = \
"select * \n" \
" from idst0.rydm_t"
userName = "dataex"
password = "cpic123456"
dbName = "10.39.0.86/xmcx1"
conn = cx_Oracle.connect( getConnectString(userName,password,dbName) )
curs = conn.cursor()
result = curs.execute(sql)
row = curs.fetchone()
print( row )
curs.close()
conn.close()