Jan 052005
Not too big a accomplishment for the experienced .NET-programmer, but since I’m still learning .NET, and ODP.NET and IronPython, I think I did something great. This is the script (don’t be scared):
import sys sys.LoadAssemblyByName('Oracle.DataAccess') from Oracle.DataAccess import * from Oracle.DataAccess.Client import * OraCon = OracleConnection() OraCon.ConnectionString = 'User Id=scott; Password=tiger; Data Source=ORCL' OraCon.Open() OraCmd = OraCon.CreateCommand() OraCmd.CommandText = 'select ename from emp where deptno = 20' OraDR = OraCmd.ExecuteReader() while OraDR.Read(): print("Employee Name: " + OraDR.GetString(0)) OraCon.Close()
And this is the output: