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

De vic para YURI

Estas en el tema de De vic para YURI en el foro de ASP Clásico en Foros del Web. <% @LANGUAGE = VBScript %> <HTML> <HEAD> <style> .vic { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-style: normal; color: #003366; } </style> <TITLE>Fechas2.asp</TITLE> </HEAD> ...
  #1 (permalink)  
Antiguo 21/06/2002, 12:00
 
Fecha de Ingreso: mayo-2002
Ubicación: Mexico DF
Mensajes: 119
Antigüedad: 22 años, 1 mes
Puntos: 0
De vic para YURI

<% @LANGUAGE = VBScript %>
<HTML>
<HEAD>
<style>
.vic {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-style: normal;
color: #003366;
}
</style>
<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


'Conexion a la base de datos'
strCon = "driver={SQL Server};server=server;uid=sa;pwd=sa;database=vic&q uot;
set conn = Server.CreateObject("ADODB.Connection")
conn.open(strCon)



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

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

fechaini = Day(fechaini) & "/" & Month(fechaini) & "/" & Year(fechaini)
fechafin = Day(fechafin) & "/" & Month(fechafin) & "/" & Year(fechafin)

'fechaini = Month(fechaini) & "/" & Day(fechaini) & "/" & Year(fechaini)
'fechafin = Month(fechafin) & "/" & Day(fechafin) & "/" & Year(fechafin)


'Ahora creamos la sentencia SQL
'sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between "& fechaini &" and "& fechafin &""
Set RS = Server.CreateObject("ADODB.Recordset")
'sSQL="Select * From P1_ORDENES_COMPLETADAS WHERE DATE_COMPLETED between '"& fechaini &"' and '"& fechafin &"'"'vic
sSQL="select COMPLETION_SUBINVENTORY,WIP_ENTITY_NAME,SEGMENT1,D ESCRIPTION,convert (varchar(11),SCHEDULED_START_DATE) as SCHEDULED_START_DATE,START_QUANTITY, QUANTITY_COMPLETED, QUANTITY_SCRAPPED, MEANING,DATE_RELEASED,SCHEDULED_COMPLETION_DATE,DA TE_COMPLETED,DATE_CLOSED from P1_ORDENES_COMPLETADAS where DATE_COMPLETED between '"& fechaini &"' and '"& fechafin &"'"'vic

'Response.Write(sSQL)
'Response.End()
'sSQL="Select top 10 * From P1_ORDENES_COMPLETADAS"
RS.Open sSQL, conn 'Vic

'SELECT campon FROM tabla WHERE fechaini > fechaini AND fechafin< fechafin"
'response.Write(sSQL) Vic

'Recogemos los valores del formulario

'Recordset.Open Conn, sSQL
'Ejecutamos la orden
'set Recordset = Conn.Execute(sSQL)
'Mostramos los registros
%>
<table align="center" border=1 width="100%" class="vic">
<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 22:13.