forked from boo-lang/boo
-
Notifications
You must be signed in to change notification settings - Fork 0
Oracle
rollynoel edited this page Jun 13, 2013
·
2 revisions
by Marcos Sanchez Provencio (see this note).
import System.Data.OracleClient
connectionString ="Data Source=rioja;User ID=system;Password=xxxx;" dbcon = OracleConnection(connectionString) dbcon.Open() dbcmd = dbcon.CreateCommand(); sql = "SELECT nombre, descripcion from norna.dic_tablas" dbcmd.CommandText = sql reader = dbcmd.ExecuteReader() while reader.Read(): nombre = reader["nombre"] descripcion = reader["descripcion"] print "Tabla: $nombre Descripción: $descripcion"
To compile (from boo/bin):
./booc.exe -r:System.Data.OracleClient ../examples/pruebaOracle.boo
To run:
./pruebaOracle.exe
See also Database Recipes and ADO.NET resources.