Foros del Web » Programación para mayores de 30 ;) » .NET »

Problemas con Repeater...

Estas en el tema de Problemas con Repeater... en el foro de .NET en Foros del Web. Me pueden ayudar y solucionar este problema..... Error de compilación Descripción: Error durante la compilación de un recurso requerido para dar servicio a esta solicitud. ...
  #1 (permalink)  
Antiguo 05/12/2003, 09:22
Avatar de vamp_02  
Fecha de Ingreso: febrero-2002
Ubicación: Santiago de Chile
Mensajes: 367
Antigüedad: 22 años, 2 meses
Puntos: 0
Problemas con Repeater...

Me pueden ayudar y solucionar este problema.....

Error de compilación
Descripción: Error durante la compilación de un recurso requerido para dar servicio a esta solicitud. Revise los detalles de error específicos siguientes y modifique el código fuente en consecuencia.

Mensaje de error del compilador: BC30456: 'Fill' no es un miembro de 'System.Data.OleDb.OleDbCommand'.

Error de código fuente:



Línea 16: objConn.open
Línea 17: Dim ds As New DataSet
Línea 18: objcomm.Fill(ds)
Línea 19:
Línea 20: ' Seleccione la vista de datos y vincúlela al control del servidor


Archivo de origen: c:\inetpub\wwwroot\autorizacion\ahora.aspx Línea: 18



Gracias
__________________
yerba mala nunca....te la fumes...
  #2 (permalink)  
Antiguo 05/12/2003, 12:16
Avatar de lucxx  
Fecha de Ingreso: noviembre-2003
Ubicación: Madrid
Mensajes: 321
Antigüedad: 20 años, 5 meses
Puntos: 0
puedes poner algo mas de codigo? que es ese objcomm?
__________________
Salu2

www.pcealcala.net
  #3 (permalink)  
Antiguo 05/12/2003, 12:24
Avatar de vamp_02  
Fecha de Ingreso: febrero-2002
Ubicación: Santiago de Chile
Mensajes: 367
Antigüedad: 22 años, 2 meses
Puntos: 0
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="vb" Debug="true"%>
<html>
<head>
<title>Ahora</title>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
dim fecha_ahora as date = now.date
fch_actual.text = fecha_ahora
Dim objConn As New OleDbConnection (ConfigurationSettings.appSettings("fact"))
Dim sSQL as string
sSQL = "select DECODE(TO_DATE(SYSDATE,'DD-MM-YY'), A.FCH_1, A.DESTINATARIO1,A.FCH_2, A.DESTINATARIO2,A.FCH_3, A.DESTINATARIO3,A.FCH_4, A.DESTINATARIO4,NULL)as Destinatario,DECODE(TO_DATE(SYSDATE,'DD-MM-YY'), A.FCH_1, A.FCH_1,A.FCH_2, A.FCH_2,A.FCH_3, A.FCH_3,A.FCH_4, A.FCH_4,NULL)as Fecha,a.fase as fase from stft A where (a.fch_1 = to_date(sysdate,'dd-mm-yy') or a.fch_2 = to_date(sysdate,'dd-mm-yy') OR a.fch_3 = to_date(sysdate,'dd-mm-yy') OR a.fch_4 = to_date(sysdate,'dd-mm-yy')) order by 1"
'response.Write(ssql)
Dim objcomm As New OleDbCommand (sSQL, objConn)
objConn.open
Dim ds As New DataSet
objcomm.Fill(ds)

' Seleccione la vista de datos y vincúlela al control del servidor
Repeater1.DataSource = ds
Repeater1.DataBind()

End sub
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style></head>
<body>
<h2 align="center">Destinatarios de Facturas</h2>
<br>
<asp:Label ID="fch_actual" runat="server"/>
<br>
<ASP:Repeater id="Repeater1" runat="server" >
<HeaderTemplate>
<table>
<tr>
<td><b>Destinatario</b></td>
<td><b>Fecha</b></td>
<td><b>Fase</b></td>
</tr>
</HeaderTemplate>

<ItemTemplate>
<tr>
<td> <%# Container.DataItem("destinatario") %></td>
<td> <%# Container.DataItem("fecha") %> </td>
<td> <%# Container.DataItem("fase") %> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:Repeater>
</body>
</html>
__________________
yerba mala nunca....te la fumes...
  #4 (permalink)  
Antiguo 05/12/2003, 12:32
Avatar de lucxx  
Fecha de Ingreso: noviembre-2003
Ubicación: Madrid
Mensajes: 321
Antigüedad: 20 años, 5 meses
Puntos: 0
Dim objConn As New OleDbConnection (ConfigurationSettings.appSettings("fact"))
Dim sSQL as string
sSQL = "select DECODE(TO_DATE(SYSDATE,'DD-MM-YY'), A.FCH_1, A.DESTINATARIO1,A.FCH_2, A.DESTINATARIO2,A.FCH_3, A.DESTINATARIO3,A.FCH_4, A.DESTINATARIO4,NULL)as Destinatario,DECODE(TO_DATE(SYSDATE,'DD-MM-YY'), A.FCH_1, A.FCH_1,A.FCH_2, A.FCH_2,A.FCH_3, A.FCH_3,A.FCH_4, A.FCH_4,NULL)as Fecha,a.fase as fase from stft A where (a.fch_1 = to_date(sysdate,'dd-mm-yy') or a.fch_2 = to_date(sysdate,'dd-mm-yy') OR a.fch_3 = to_date(sysdate,'dd-mm-yy') OR a.fch_4 = to_date(sysdate,'dd-mm-yy')) order by 1"
'response.Write(ssql)
Dim objcomm As New OleDbDataAdapter (sSQL, objConn)
objConn.open
Dim ds As New DataSet
objcomm.Fill(ds)


A ver si así funciona

PD: tienes el código asi de desordenado en la pagina o s q ha salido asi aqui??
  #5 (permalink)  
Antiguo 05/12/2003, 12:45
Avatar de vamp_02  
Fecha de Ingreso: febrero-2002
Ubicación: Santiago de Chile
Mensajes: 367
Antigüedad: 22 años, 2 meses
Puntos: 0
no paso nada......
__________________
yerba mala nunca....te la fumes...
  #6 (permalink)  
Antiguo 05/12/2003, 13:01
Avatar de lucxx  
Fecha de Ingreso: noviembre-2003
Ubicación: Madrid
Mensajes: 321
Antigüedad: 20 años, 5 meses
Puntos: 0
que quieres decir con que no paso nada?
Dio algun error o simplemente no se mostro nada por pantalla?

De todas formas yo utilizaría:

objComm.Fill(ds, "nombreTabla")

' Seleccione la vista de datos y vincúlela al control del servidor
Repeater1.DataSource = ds.Tables("nombreTabla")
Repeater1.DataBind()


y cierra la conexion!
objConn.Close()
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 04:52.