Estimados,
Espero me pueda ayudar con el siguiente problema:
Mostrare el código para ver si me pueden ayudar, el probelma es que al
incluir transacciones me arroja el siuiente error:
Cannot create new connection because in manual or distributed
transaction mode, Nº - 2147467259
y si elimino las transacciones no arroja ningun error, el problema es
que necesito usar las transacciones como medida de seguridad.
<%
Dim Conn
AbreBase
Set rsNoti = Conn.Execute("Select Titulo,Glosa,Destacada,Ver_Web,Fecha
from bdNoticias Where Id_Noticia=" & Request.Form("id") & "")
xxxxxxxxxxxxxx
Set rsImg = Conn.Execute("Select bdImagenes.NImagen from
bdImagenes,bdNoticias Where bdImagenes.Id_Imagen=bdNoticias.Id_Imagen
and bdNoticias.Id_Noticia=" & Request.Form("id") & "")
If Not rsImg.EOF Then
%>
xxxxxxxxxxxxxxx
<%
End if
rsImg.Close
Set rsImg = Nothing
rsNoti.Close
Set rsNoti = Nothing
Hasta aqui no tengo el problemas...
Aqui es donde comienza el problema...
If Request.Form("eliminagal")>0 Then
On Error Resume Next
"""Conn.BeginTrans"""
Set rsImg = Conn.Execute("Select NImagen from
bdImagenes Where Id_Imagen=" & 0+Request.Form("eliminagal") & "")
Conn.Execute("Delete from bdImagenes Where Id_Imagen="
& Request.Form("eliminagal") & "")
If Err<>0 Then
rsImg.Close
Set rsImg = Nothing
Conn.RollbackTrans
Else
Elimina("../Imagenes/" & rsImgDel("NImagen"))
rsImg.Close
Set rsImg = Nothing
Conn.CommitTrans
End if
End if
Leer las respuestas