-
Notifications
You must be signed in to change notification settings - Fork 148
Oracle
Nathaniel Sabanski edited this page Jan 20, 2016
·
5 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.