Visual Basic .NET – Transacción con SqlConnection
Written by lopezatienza on 12/04/2012 – 14:33 -
Dim conexion As SqlConnection = Nothing
Dim transaccion As SqlTransaction = Nothing
Try
conexion = New SqlConnection("ConnectionString")
conexion.Open()
transaccion = conexion.BeginTransaction()
'Lógica de negocio
transaccion.Commit()
transaccion = Nothing
conexion.Close()
conexion = Nothing
Catch ex As Exception
If (Not IsNothing(transaccion)) Then
transaccion.Rollback()
transaccion = Nothing
End If
If (Not IsNothing(conexion)) Then
conexion.Close()
conexion = Nothing
End If
End Try
Posted in Visual Basic .NET | No Comments »
CSharp – Leer un fichero
13/12/2009 – 23:17Aquí os dejo el código en C# para poder leer ...
No Comments »Windows 2000 Server – Capitulo 5º Instalacion y configuracion de servicios de DHCP y DNS
15/10/2009 – 10:41CAPÍTULO 5 INSTALACIÓN Y CONFIGURACIÓN DE SERVICIOS DE DHCP Y ...
No Comments »Windows 2000 Server – Capitulo 4º Recursos compartidos
25/09/2009 – 04:28CAPÍTULO 4 RECURSOS COMPARTIDOS 4.1 CONFIGURACIÓN DE RECURSOS COMPARTIDOS Como se ha ...
No Comments »Windows 2000 Server – Capitulo 3º Active Directory
25/09/2009 – 04:25CAPÍTULO 3 ACTIVE DIRECTORY 3.1 INTRODUCCIÓN A LOS SERVICIOS DE DIRECTORIO Todo ...
No Comments »Windows 2000 Server – Capitulo 2º Instalacion
25/09/2009 – 04:07CAPÍTULO 2 INSTALACIÓN 2.1 REQUISITOS DEL SISTEMA Antes de instalar Microsoft Windows ...
No Comments »Windows 2000 Server – Capitulo 1º Introduccion
25/09/2009 – 04:04CAPÍTULO 1 INTRODUCCIÓN 1.1 SISTEMAS OPERATIVOS Un sistema operativo es un programa ...
No Comments »Mysql – Integridad referencial
06/09/2009 – 15:05Integridad Referencial Claves primarias Para entender lo que son las claves foráneas, ...
No Comments »Java – Paso a paso Tema 11
06/09/2009 – 12:30TEMA11. Aplicaciones con Java En esta unidad el alumno aprenderá a ...
4 Comments »Java – Paso a paso Tema 10
05/09/2009 – 21:42TEMA10. Conceptos avanzados de Java En esta Unidad Didáctica intentaremos introducir ...
No Comments »Java – Paso a paso Tema 9
05/09/2009 – 19:45TEMA9. Arrays y colecciones en Java En esta Unidad Didáctica aprenderemos ...
No Comments »
