Foros del Web » Programando para Internet » ASP Clásico »

[ AYUDA ] Recoleccion de Datos

Estas en el tema de [ AYUDA ] Recoleccion de Datos en el foro de ASP Clásico en Foros del Web. Hola. Yo soy demasiado nuevo en ASP, me manejo mejor en PHP. Pero ahora me pidieron algo en ASP. Tengo el codigo: Código PHP: <%@  ...
  #1 (permalink)  
Antiguo 24/08/2006, 15:55
 
Fecha de Ingreso: abril-2006
Mensajes: 119
Antigüedad: 18 años, 2 meses
Puntos: 0
[ AYUDA ] Recoleccion de Datos

Hola. Yo soy demasiado nuevo en ASP, me manejo mejor en PHP. Pero ahora me pidieron algo en ASP. Tengo el codigo:
Código PHP:
<%@ Page Language="VB" %>
<%@ 
Import Namespace="System.Data" %>
<%@ 
Import Namespace="System.Data.OleDb" %>
<
script runat="server">
Sub Page_Load(sender as System.Objectas System.EventArgs)
Dim adap as OleDbDataAdapter
Dim ds 
as new dataset
adap 
= new OleDbDataAdapter ("SELECT * FROM Tblm_elempro ORDER BY cod_elemento","Provider=Microsoft.Jet.OLEDB.4.0; Data Source=/BaseEnviar.mdb;")
adap.Fill (ds)
Dim cod_element as DataRow
For each cod_element in ds.Tables(0).Rows
Ahora tengo el registro actual en 
"cod_elemento"
response.write (cod_element("cod_oficina") & " " cod_element("cod_zona") & "<br>")
next
end sub
</script>
 
Me tira el siguiente error:
Active Server Pages- Error 'ASP 0129'

Unknown scripting language

/aca/prueba.aspx, line 1

The scripting language 'VB' is not found on the server. 500: 0


Otra cosa. Yo quiero mostrar eso, como hago:

Código PHP:
<style type="text/css">
<!--
.
Estilo1 {
    
font-size12px;
    
font-familyGenevaArialHelveticasans-serif;
}
-->
</
style>
</
head>

<
body>
<
table width="520" border="0" cellpadding="0" cellspacing="0" class="Estilo1">
  <!--
DWLayoutTable-->
  <
tr>
    <
td height="17" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
  </
tr>
  <
tr>
    <
td height="224" colspan="2" align="center" valign="middle"><br />
    <
img src="figuras/"" & cod_element("rutagraf") &.jpg"" width="370" height="265" /><br /></td>
  </tr>
  <tr>
    <td width="
168" height="15" valign="top"><strong>Precio</strong></td>
    <td width="
352" valign="top">Precio!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Antiguedad</strong></td>
    <td valign="
top">Antiguiedad!</td>
  </tr>
  <tr>
    <td height="
16" valign="top"><strong>Estado</strong></td>
    <td valign="
top">Estado!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Provincia</strong></td>
    <td valign="
top">Provincia!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Poblacion</strong></td>
    <td valign="
top">Poblacion!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Zona</strong></td>
    <td valign="
top">Zona!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Orientacion / Vista </strong></td>
    <td valign="
top">Orientacion! / Vista! </td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Ubicacion</strong></td>
    <td>Ubicacion!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Amoblamiento</strong></td>
    <td valign="
top">Amoblamiento!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Techo</strong></td>
    <td valign="
top">Techo!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Habitaciones</strong></td>
    <td valign="
top">Habitaciones!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Armarios</strong></td>
    <td valign="
top">Armarios!</td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Terrazas</strong></td>
    <td valign="
top">Terrazas!</td>
  </tr>
  <tr>
    <td height="
15" valign="middle"><strong>Servicios Publicos </strong></td>
    <td valign="
top">Servicios Publicos! </td>
  </tr>
  <tr>
    <td height="
15" valign="top"><strong>Financiacion</strong></td>
    <td valign="
top">Financiacion!</td>
  </tr>
  <tr>
    <td height="
19">&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td height="
103" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="
100" height="103" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="
100" height="82" align="center" valign="middle">MINIATURA<img src="figuras/imagenes!.jpg" width="50" height="50" /></td>
            </tr>
          <tr>
            <td height="
21" align="center" valign="middle">HABITACION!</td>
            </tr>
          </table>        </td>
          <td width="
420">&nbsp;</td>
        </tr>
      
    </table></td>
  </tr>
</table> 
Como hago? Gracias....
  #2 (permalink)  
Antiguo 24/08/2006, 16:08
 
Fecha de Ingreso: abril-2004
Ubicación: México D.F.
Mensajes: 1.724
Antigüedad: 20 años, 1 mes
Puntos: 4
el error tienE algo q ver con http://support.microsoft.com/default.aspx/kb/296626
Nota, el foro correcto sería .NET
  #3 (permalink)  
Antiguo 24/08/2006, 16:43
 
Fecha de Ingreso: abril-2006
Mensajes: 119
Antigüedad: 18 años, 2 meses
Puntos: 0
Listo. Ya lo corregui. Ahora otro Problema:

Lo que quiero saber como introducir una variable

<td width='352' valign='top'>ACA</td>

Es un campo de una tabla de Access, yo pongo asi y me tira error
<td width='352' valign='top'><%= Response.Write(tabla(precio)) %></td>

Y me tira este error:

Error de Microsoft VBScript en tiempo de ejecución- Error '800a0009'

El subíndice está fuera del intervalo

/aca/prueba.aspx, line 32


Como introduzco "ACA" esta variable: tabla(precio)

Gracias. mauro.
  #4 (permalink)  
Antiguo 25/08/2006, 02:47
Avatar de macedo  
Fecha de Ingreso: enero-2002
Ubicación: Madrid
Mensajes: 124
Antigüedad: 22 años, 4 meses
Puntos: 0
Hola maurozone.

<%= Variable%> Equivale a <% Response.write(variable) %>

Lo que no existe es <%=Response.write(variable)%>

O sea, que o pones:

<td width='352' valign='top'><%Response.Write(tabla(precio)) %></td>

Ó

<td width='352' valign='top'><%=tabla(precio)%></td>

Saludos.

PD. es <%@LANGUAGE="VBSCRIPT"%> en vez de VB.
__________________
"Hay que simplificar las cosas tanto como sea posible, pero no más".
Albert Einstein.
  #5 (permalink)  
Antiguo 25/08/2006, 10:47
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 23 años, 3 meses
Puntos: 535
Cita:
PD. es <%@LANGUAGE="VBSCRIPT"%> en vez de VB.
No me queda claro si estás trabajando en ASP "clásico" o en .NET
__________________
...___...
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:20.