Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/07/2010, 13:53
ngonzalez
 
Fecha de Ingreso: marzo-2008
Mensajes: 17
Antigüedad: 16 años, 1 mes
Puntos: 0
Pregunta Inserta mas filas en una tabla sql

HOLA, LES QUERIA PEDIR AYUDA ... NO ENTIENDO PORQUE A VECES GRABA DOS VECES UN REGISTRO CON INSERT EN SQL SERVER. ESTAS SON MIS LINEAS

if sw="GRABAR" then
set conexion = server.createObject("ADODB.connection")
conexion.OPen = "driver={SQL Server};server=10.7.192.253;uid=anexos;pwd=anexos; database=personal"


sql2 = "Sp_InsertaAnexos '" & trim(xrut) & "','" & ucase(trim(xnombre)) & "','" & ucase(trim(xpaterno)) & "','" & ucase(trim(xmaterno)) & "','" & xanexo & "','" & xemail & "','" & xidunidad & "','" & xactivo & "','" & xfono & "','" & ucase(xfisico) & "','" & ucase(xhorario) & "', '" & ucase(xfuncion) & "','" & mid(trim(xestablecimiento),1,1) & "'"

set Rs = conexion.execute(sql2)
conexion.close
set conexion=nothing
%>
<script language="javascript">
location.href="mantdirectorio.asp";
</script>
<%
else
%>
<script language="javascript">
location.href="mantdirectorio.asp";
</script>
<%
End if
OJALA ALGUIEN SEPA.GRACIAS