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:

 Posted by at 23:32
Jan 052005
 

While you’re at the Oracle download pages, have a look at their HTML DB version 1.6. It’s a browser-based development-tool for webapplications; you can view a quicktour here.

Very neat stuff.

 Posted by at 00:25