Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/12/2008, 06:38
Pete1006
 
Fecha de Ingreso: diciembre-2008
Mensajes: 13
Antigüedad: 16 años, 5 meses
Puntos: 0
Respuesta: Como trabajar sobre una base de Datos Oracle

he leido varias cosas en la web y realize este primer codigo. la mayoria de los manuales apuntan a un codigo parecido a este, pero a mi me esta presentando errores... de seguro son novatadas! espero de su ayuda!! gracias

<body>
<%
Option Explicit
Dim oCon, Ocom, oRec
set oCon=CreateObject("ADODB.Connection")
oCon.Open"DSN='xxx'; USER='xxx'; PASSWORD='xxx'"
set oCom=CreateObject("ADODB.Command")
set oRec=CreateObject("ADODB.Recordset")
oCom.CommandText="SELECT * FROM PLAN_TABLE
WHERE NUM_LOTE='256' AND NB_ABREV_LOTE='GO';"
oCom.ActiveConnection=oCon
Set oRec=oCom.Execute
%>



<form id="form1" name="form1" method="post" action="">
<table width="558" border="1">
<tr>
<th width="130" scope="col"><div align="center">COD DEL PROD </div></th>
<th width="130" scope="col"><div align="center">NRO. DE LOTE </div></th>
<th width="130" scope="col"><div align="center">VOLUMEN</div></th>
<th width="140" scope="col"><div align="center">FECHA DEL LOTE </div></th>
</tr>
<tr>
<td><%Response.Write("=oRec.Fields("COD_PROD")") %> &nbsp;</td>
<td><%Response.Write("=oRec.Fields("NUM_LOTE")")%> &nbsp;</td>
<td><%Response.Write("=oRec.Fields("VOL_BARRILES_H ORA")")%>&nbsp;</td>
<td><%Response.Write("=oRec.Fields("F_LOTE_PROD")" )%>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form>
<%
oRec.Close
oCon.Close
Set oCon=Nothing
Set oCom=Nothing
Set oRec=Nothing
%>
</body>