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:17

Aquí 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:41

CAPÍ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:28

CAPÍ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:25

CAPÍ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:07

CAPÍ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:04

CAPÍTULO 1 INTRODUCCIÓN 1.1   SISTEMAS OPERATIVOS Un sistema operativo es un programa ...

No Comments »

Mysql – Integridad referencial

06/09/2009 – 15:05

Integridad Referencial Claves primarias Para entender lo que son las claves foráneas, ...

No Comments »

Java – Paso a paso Tema 11

06/09/2009 – 12:30

TEMA11. Aplicaciones con Java En esta unidad el alumno aprenderá a ...

4 Comments »

Java – Paso a paso Tema 10

05/09/2009 – 21:42

TEMA10. Conceptos avanzados de Java En esta Unidad Didáctica intentaremos introducir ...

No Comments »

Java – Paso a paso Tema 9

05/09/2009 – 19:45

TEMA9. Arrays y colecciones en Java En esta Unidad Didáctica aprenderemos ...

No Comments »
RSS
MCC