Ver Mensaje Individual
  #8 (permalink)  
Antiguo 13/02/2003, 13:15
Avatar de DanielRey
DanielRey
Usuario no validado
 
Fecha de Ingreso: enero-2001
Ubicación: Mendoza
Mensajes: 630
Antigüedad: 24 años, 5 meses
Puntos: 1
A ver Miguel...

Probá con esta forma y decime que resulta...

Código PHP:
<html>
<
head>
<
meta http-equiv="Content-Language" content="es">
<
meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<
meta name="ProgId" content="FrontPage.Editor.Document">
<
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<
title>Consulta de una Base de Dato</title>
</
head>
<
body bgcolor="#808000">
<
div align="center">
<
center>
<
table border="2" width="50%" bgcolor="#008000">
<
tr>
<
td width="100%">
<
p align="center"><font color="#FFFFFF"><B>RESULTADO DE LA CONSULTA</B></font></td>
</
tr>
</
table>
</
center>
</
div>
<%
  
Option Explicit
  Dim Conn
  Dim Rs
  Dim curDir
  Set Conn 
Server.CreateObject("ADODB.Connection")
  
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\inetpub\asp\graciela.mdb;" 
  
Set Rs Server.CreateObject("ADODB.Recordset")
  
Set Rs.ActiveConnection Conn
  Rs
.Source "select Cantidad from Producto Where codigo = " Request.Form("Codigo")
  
Rs.Open
  
If Rs.EOF Then
    Response
.write("Código inexistente: " Request.Form("Codigo"))
  Else
    
Conn.Execute "Update Producto set Cantidad = " Rs("Cantidad") - Request.Form("cantidadx") & " where codigo = " Request.Form("Codigo")
    
Rs.Close
 La actualización ya está lista
.

    
Rs.Source "select * from  Producto Where codigo = " Request.Form("Codigo")
    
Rs.Open
%>
<
table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90" alt="70">
<
tr>
<
td width="20%" valign="middle" align="center" bgcolor="#FFFFFF">
<
font color="#000000"><font Size="5"><%=rs("Cantidad")%></font></td>
<
td width="100%"><img src="<%=rs("foto")%>"width="90" alt="70" >"
</td>
<BR>

<table border="
0" width="50%">
<tr>
<th width="
20%" valign="middle" align="center" bgcolor="#008080">
<font color="#000000">Codigo</font></th>
<
th width="20%" valign="middle" align="center" bgcolor="#008080">
<
font color="#000000">Descripcion</font></th>
<
th width="20%" valign="middle" align="center" bgcolor="#008080">
<
font color="#000000">Cantidad</font></th>
<
th width="20%" valign="middle" align="center" bgcolor="#008080">
<
font color="#000000">Precio</font></th>
</
tr>
<%
    do while 
not Rs.eof
%>
<
tr>
<
td width="20%" valign="middle" align="center" bgcolor="#FFFFFF">
<
font color="#000000"><font Size="5"><%=FormatNumber((Rs("Codigo").Value), 0, -2, -1, -1)%></font></td>
<
td width="20%" valign="middle" align="center" bgcolor="#FFFFFF">
<
font color="#000000"><font Size="5"><%=Rs("Descripcion")%></font></td>
<
td width="20%" valign="middle" align="center" bgcolor="#FFFFFF">
<
font color="#000000"><font Size="5"><%=Rs("Cantidad")%></font></td>
<
td width="20%" valign="middle" align="center" bgcolor="#FFFFFF">
<
font color="#000000"><font Size="5"><%=Rs("Precio")%></font></td>
<%
response.write (pretotal)%>
</
tr>

<%
      
Rs.movenext
    loop
  end 
if
  
Rs.Close
  Conn
.Close
  Set Rs 
Nothing
  Set Conn 
Nothing
%>
</
table>
</
CENTER>
<
p> </p>
<
p align="center"><a href="fconsultagraciela2.html">Otra vez</a></p>
</
body
Voy a andar por aquí un rato más.

Suerte