Ver Mensaje Individual
  #7 (permalink)  
Antiguo 31/05/2009, 16:49
ejconan
 
Fecha de Ingreso: mayo-2009
Mensajes: 65
Antigüedad: 15 años, 11 meses
Puntos: 0
Respuesta: transacciones asp y mysql

Bueno pues parece que ahora funciona, os pego el código:

Lo único es que no me muestra la frase, "FINALIZADO CON ERRORES" y me muestra el error como si no hubiera el control de errores:

[MySQL][ODBC 5.1 Driver][mysqld-5.1.30-community]Unknown column 'co_tiend' in 'field list'
(el error es provocado para probar)

¿donde tengo el problema?

Código:
'EJECUTA LA TRANSACCION DE LAS SQLs
CON.BeginTrans

con.execute  SQLDEL1
con.execute  SQLDEL2

CON.EXECUTE SQLC
response.write ("<br>" &time()&"- Tabla Temporal Creada")

CON.EXECUTE SQLL
response.write ("<br>" &time()&"- Fichero Cargado en Tabla Temporal")

CON.EXECUTE SQLN1
CON.EXECUTE SQLN2
CON.EXECUTE SQLN3
response.write ("<br>" &time()&"- Actualizacion de Nulos en TABLATEMPORAL")


CON.EXECUTE SQLF
response.write ("<br>" &time()&"- Creada Tabla para filtrar 'TBLFILTRO'")

CON.EXECUTE SQL2
response.write ("<br>" &time()&"- Insertados datos en  'TBLFILTRO' ")

CON.EXECUTE SQL3
RESPONSE.WRITE ("<BR>" &time()&"- Nuevos Datos Importadas CABECERAS")

CON.EXECUTE SQL4
RESPONSE.WRITE ("<BR>" &time()&"- Nuevos Datos Importadas CABECERAS 2")

CON.EXECUTE SQL5
RESPONSE.WRITE ("<BR>" &time()&"- Nuevos Datos Importadas LINEAS")

CON.EXECUTE SQL6
RESPONSE.WRITE ("<BR>" &time()&"- Nuevos Datos Importados CLIENTES")

CON.EXECUTE SQL7
RESPONSE.WRITE ("<BR>" &time()&"- Nuevos Datos Importados CLIENTES")

CON.EXECUTE SQL8
RESPONSE.WRITE ("<BR>" &time()&"- Actualización de CABECERAS")

CON.execute  SQLDEL1
CON.execute  SQLDEL2

if Err.number <> 0 Then 
Response.Clear 
con.RollBackTrans
Err.Clear 
response.write ("Finalizado con ERRORES")
Response.End 
end if

response.write ("Finalizado OK")
con.CommitTrans

'CERRANDO CONEXIONES
con.close
Set con = nothing