python 连接oracle

import cx_Oracle
>>> conn = cx_Oracle.connect('user','0909',cx_Oracle.makedsn('192.168.1.176',1521,'testDate'))
>>> cur = conn.cursor()
>>> cur.execute('select * from admin')
[<cx_Oracle.STRING with value None>, <cx_Oracle.STRING with value None>, <cx_Oracle.NUMBER with value None>, <cx_Oracle.NUMBER with value None>]
>>> for row in cur:
	print row

	
('oopop', '898989', 84, 931)
('gfyt', 'ygfhfghfg', 84, 931)
('jjk', 'dytsql', 84, 931)
('dyt', 'dytsql', 1, 0)
('we', '66', 381, 935)
>>> 

http://www.python.net/crew/atuining/cx_Oracle/html/module.html

可以参看 connect 参数

你可能感兴趣的:(html,oracle,.net,python)