Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/03/2003, 06:53
Avatar de 8461277
8461277
 
Fecha de Ingreso: diciembre-2002
Ubicación: san juan de los morros
Mensajes: 887
Antigüedad: 22 años, 4 meses
Puntos: 1
Amigo maestro no entiendo lo que me quiere decir, utilizo uno o los dos????'

Aqui te dejo todo el codigo que yo utilizo:

<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=..\\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
cant=cstr(request.form ("cantidadx"))
'response.write (cant)
pre=rs("Precio")
'response.write (pre)
pretotal= request.form ("cantidadx") * rs("Precio")
'pretotal= cant * pre

%>
<CENTER>
<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.FormatNumber (pretotal).Value), 0, -2, -1, -1)%>
</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="fconsultagraciela3.html">Otra vez</a></p>
</body>

Ayudame por favor????????
Mis pagina lo tengo alojada en:

www4.dotnetplayground.com/