Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2008, 18:55
FernandoBalaguer
 
Fecha de Ingreso: julio-2008
Mensajes: 1
Antigüedad: 16 años, 10 meses
Puntos: 0
Respuesta: me duplica los campos por favor ayuda!!!

if Request.Form("txtaction")="G" and IDSit="" then
if Nombre<>"" then
strSQLI="INSERT INTO PROMOCIONES (PRO_NOMBRE, PRO_DESCRIPCION) VALUES ('"& Nombre &"','"& Descripcion &"')" strSQLID="SELECT MAX(ID_PROMOCION)AS MAXIMO FROM PROMOCIONES"
set objrsi=server.CreateObject("ADODB.Recordset")
Conexion.BeginTrans()
Conexion.Execute(strSQLI)
set objRSID=Conexion.Execute(strSQLID)



si te das cuenta esta ejecutando dos veces el mismo query de insersion:

1. Conexion.Execute(strSQLI)
2. set objRSID=Conexion.Execute(strSQLID)