1. 程式人生 > >python cx_oracle 變數形式連線資料庫

python cx_oracle 變數形式連線資料庫

  os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.AL32UTF8'
   conn = cx_Oracle.connect(dbuser,dbpass,dbip+'/'+dbservice)
   cursor = conn.cursor()
   a = cursor.execute(customsql)
   d={}
   info = cursor.fetchall()
   print info
   print type(info)