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

Desplegar mis datos del query, checa esto

Estas en el tema de Desplegar mis datos del query, checa esto en el foro de ASP Clásico en Foros del Web. Código: <% LANGUAGE = VBScript %> <HTML> <HEAD> <TITLE>Fechas2.asp</TITLE> </HEAD> <BODY bgcolor=99CCFF> <IMG src="image002.jpg"> <% Dim COMPLETION_SUBINVENTORY, WIP_ENTITY_NAME, SEGMENT1 Dim DESCRIPTION, SCHEDULED_START_DATE, START_QUANTITY Dim QUANTITY_COMPLETED, ...
  #1 (permalink)  
Antiguo 20/06/2002, 17:32
 
Fecha de Ingreso: junio-2002
Mensajes: 37
Antigüedad: 22 años, 10 meses
Puntos: 0
Desplegar mis datos del query, checa esto

Código:
  
<% LANGUAGE = VBScript %>
<HTML>
<HEAD>
<TITLE>Fechas2.asp</TITLE>
</HEAD>
<BODY bgcolor=99CCFF>
<IMG src="image002.jpg">
<%

Dim COMPLETION_SUBINVENTORY, WIP_ENTITY_NAME, SEGMENT1
Dim DESCRIPTION, SCHEDULED_START_DATE, START_QUANTITY
Dim QUANTITY_COMPLETED, MEANING, DATE_RELEASED
Dim SCHEDULED_COMPLETION_DATE, DATE_COMPLETED, DATE_CLOSED
Dim fechaini 
Dim fechafin 
Dim sSQL, Recordset, Conn

'Recogemos los valores del formulario

fechaini= Request.Form("fechaini")
fechafin= Request.Form("fechafin")

'Instanciamos y abrimos nuestro objeto conexion 
Set Conn = Server.CreateObject("ADODB.Connection")
'Set Conn = Server.CreateObject("ADODB.Recordset")
Conn.Open "Donaldson"

'Ahora creamos la sentencia SQL 
sSQL="Select * From  P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between "& fechaini &" and "& fechafin &""
'SELECT campon FROM tabla WHERE fechaini > fechaini AND fechafin< fechafin"                   

response.Write(sSQL) 
'Set RS = Server.CreateObject("ADODB.Connection")
'Recordset.Open Conn, sSQL
'Ejecutamos la orden 
set Recordset = Conn.Execute(sSQL)
'Mostramos los registros
%>
<table align="center" border=1>
 <th>Subinventario</th>
 <th>Numero de orden</th>
 <th>Numero de parte</th>
 <th>Descripcion</th>
 <th>Fecha programada de inicio</th>
 <th>Cantidad programada de piezas</th>
 <th>Cantidad de piezas comletadas</th>
 <th>Cantidad de piezas de Scrap</th>
 <th>Status de la orden</th>
 <th>Fecha de liberacion de la orden</th>
 <th>Fecha programada para completar</th>
 <th>Fecha en que se completo</th>
 <th>Fecha en que se cerro</th>
 </tr>
<%
Do While Not Recordset.EoF
%>
<tr>
<td><%=RS("COMPLETION_SUBINVENTORY")%></td>
<td><%=RS("WIP_ENTITY_NAME")%></td>
<td><%=RS("SEGMENT1")%></td>
<td><%=RS("DESCRIPTION")%></td>
<td><%=RS("SCHEDULED_START_DATE")%></td>
<td><%=RS("START_QUANTITY")%></td>
<td><%=RS("QUANTITY_COMPLETED")%></td>
<td><%=RS("QUANTITY_SCRAPPED")%></td>
<td><%=RS("MEANING")%></td>
<td><%=RS("DATE_RELEASED")%></td>
<td><%=RS("SCHEDULED_COMPLETION_DATE")%></td>
<td><%=RS("DATE_COMPLETED")%></td>
<td><%=RS("DATE_CLOSED")%></td>
</tr>
<%
RS.MoveNext
Loop

'Cerramos el sistema de conexion
Conn.Close
%>

</table>
<br><br>
<div align="center"><a href="Grafica.asp">Ver grafica</a></div>

</BODY>
</HTML>
 :)
  #2 (permalink)  
Antiguo 20/06/2002, 17:49
 
Fecha de Ingreso: mayo-2002
Ubicación: Mexico DF
Mensajes: 119
Antigüedad: 23 años
Puntos: 0
Re: Desplegar mis datos del query, checa esto

Listo Checalo por favor y comentame si todo salio bien
Saludos

<% LANGUAGE = VBScript %>
<HTML>
<HEAD>
<TITLE>Fechas2.asp</TITLE>
</HEAD>
<BODY bgcolor=99CCFF>
<IMG src="image002.jpg">
<%

Dim COMPLETION_SUBINVENTORY, WIP_ENTITY_NAME, SEGMENT1
Dim DESCRIPTION, SCHEDULED_START_DATE, START_QUANTITY
Dim QUANTITY_COMPLETED, MEANING, DATE_RELEASED
Dim SCHEDULED_COMPLETION_DATE, DATE_COMPLETED, DATE_CLOSED
Dim fechaini
Dim fechafin
Dim sSQL, Recordset, Conn

'Recogemos los valores del formulario

fechaini= Cdate(Request.Form("fechaini"))'Vic
fechafin= Cdate(Request.Form("fechafin"))'Vic


'Instanciamos y abrimos nuestro objeto conexion
Set Conn = Server.CreateObject("ADODB.Connection")
'Set Conn = Server.CreateObject("ADODB.Recordset")
Conn.Open "Donaldson"

'Ahora creamos la sentencia SQL
'sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between "& fechaini &" and "& fechafin &""
sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between '"& fechaini &"' and '"& fechafin &"'"'vic
'SELECT campon FROM tabla WHERE fechaini > fechaini AND fechafin< fechafin"
'response.Write(sSQL) Vic
Set RS = Server.CreateObject("ADODB.Connection")
RS.Open Conn, sSQL 'Vic
'Recordset.Open Conn, sSQL
'Ejecutamos la orden
'set Recordset = Conn.Execute(sSQL)
'Mostramos los registros
%>
<table align="center" border=1>
<th>Subinventario</th>
<th>Numero de orden</th>
<th>Numero de parte</th>
<th>Descripcion</th>
<th>Fecha programada de inicio</th>
<th>Cantidad programada de piezas</th>
<th>Cantidad de piezas comletadas</th>
<th>Cantidad de piezas de Scrap</th>
<th>Status de la orden</th>
<th>Fecha de liberacion de la orden</th>
<th>Fecha programada para completar</th>
<th>Fecha en que se completo</th>
<th>Fecha en que se cerro</th>
</tr>
<%
Do While Not Rs.EoF
%>
<tr>
<td><%=RS("COMPLETION_SUBINVENTORY&q uot;)%></td>
<td><%=RS("WIP_ENTITY_NAME")%&g t;</td>
<td><%=RS("SEGMENT1")%>&l t;/td>
<td><%=RS("DESCRIPTION")%>&l t;/td>
<td><%=RS("SCHEDULED_START_DATE&quot ;)%></td>
<td><%=RS("START_QUANTITY")%&gt ;</td>
<td><%=RS("QUANTITY_COMPLETED") %></td>
<td><%=RS("QUANTITY_SCRAPPED")% ></td>
<td><%=RS("MEANING")%>&lt ;/td>
<td><%=RS("DATE_RELEASED")%> </td>
<td><%=RS("SCHEDULED_COMPLETION_DATE ")%></td>
<td><%=RS("DATE_COMPLETED")%&gt ;</td>
<td><%=RS("DATE_CLOSED")%>&l t;/td>
</tr>
<%
RS.MoveNext
Loop

'Cerramos el sistema de conexion
Conn.Close
Rs.Close'Vic
Set Rs = Nothing'Vic
%>

</table>
<br><br>
<div align="center"><a href="Grafica.asp">Ver grafica</a></div>

</BODY>
</HTML>

  #3 (permalink)  
Antiguo 20/06/2002, 17:56
 
Fecha de Ingreso: mayo-2002
Ubicación: Mexico DF
Mensajes: 119
Antigüedad: 23 años
Puntos: 0
Re: Desplegar mis datos del query, checa esto

Le hice una correccion, please checalo
Saludos

<% LANGUAGE = VBScript %>
<HTML>
<HEAD>
<TITLE>Fechas2.asp</TITLE>
</HEAD>
<BODY bgcolor=99CCFF>
<IMG src="image002.jpg">
<%

Dim COMPLETION_SUBINVENTORY, WIP_ENTITY_NAME, SEGMENT1
Dim DESCRIPTION, SCHEDULED_START_DATE, START_QUANTITY
Dim QUANTITY_COMPLETED, MEANING, DATE_RELEASED
Dim SCHEDULED_COMPLETION_DATE, DATE_COMPLETED, DATE_CLOSED
Dim fechaini
Dim fechafin
Dim sSQL, Recordset, Conn

'Recogemos los valores del formulario

fechaini= Cdate(Request.Form("fechaini"))'Vic
fechafin= Cdate(Request.Form("fechafin"))'Vic


'Instanciamos y abrimos nuestro objeto conexion
Set Conn = Server.CreateObject("ADODB.Connection")
'Set Conn = Server.CreateObject("ADODB.Recordset")
Conn.Open "Donaldson"

'Ahora creamos la sentencia SQL
'sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between "& fechaini &" and "& fechafin &""
sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between '"& fechaini &"' and '"& fechafin &"'"'vic
'SELECT campon FROM tabla WHERE fechaini > fechaini AND fechafin< fechafin"
'response.Write(sSQL) Vic
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open sSQL, conn 'Vic
'Recordset.Open Conn, sSQL
'Ejecutamos la orden
'set Recordset = Conn.Execute(sSQL)
'Mostramos los registros
%>
<table align="center" border=1>
<th>Subinventario</th>
<th>Numero de orden</th>
<th>Numero de parte</th>
<th>Descripcion</th>
<th>Fecha programada de inicio</th>
<th>Cantidad programada de piezas</th>
<th>Cantidad de piezas comletadas</th>
<th>Cantidad de piezas de Scrap</th>
<th>Status de la orden</th>
<th>Fecha de liberacion de la orden</th>
<th>Fecha programada para completar</th>
<th>Fecha en que se completo</th>
<th>Fecha en que se cerro</th>
</tr>
<%
Do While Not Rs.EoF 'Vic
%>
<tr>
<td><%=RS("COMPLETION_SUBINVENTORY&q uot;)%></td>
<td><%=RS("WIP_ENTITY_NAME")%&g t;</td>
<td><%=RS("SEGMENT1")%>&l t;/td>
<td><%=RS("DESCRIPTION")%>&l t;/td>
<td><%=RS("SCHEDULED_START_DATE&quot ;)%></td>
<td><%=RS("START_QUANTITY")%&gt ;</td>
<td><%=RS("QUANTITY_COMPLETED") %></td>
<td><%=RS("QUANTITY_SCRAPPED")% ></td>
<td><%=RS("MEANING")%>&lt ;/td>
<td><%=RS("DATE_RELEASED")%> </td>
<td><%=RS("SCHEDULED_COMPLETION_DATE ")%></td>
<td><%=RS("DATE_COMPLETED")%&gt ;</td>
<td><%=RS("DATE_CLOSED")%>&l t;/td>
</tr>
<%
RS.MoveNext
Loop

'Cerramos el sistema de conexion
Conn.Close
Rs.Close'Vic
Set Rs = Nothing'Vic
%>

</table>
<br><br>
<div align="center"><a href="Grafica.asp">Ver grafica</a></div>

</BODY>
</HTML>

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 11:05.