Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 494619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:30:47+00:00 2026-05-13T05:30:47+00:00

I’m trying to create an ado.net transaction in IronPython in asp.net and I’m getting

  • 0

I’m trying to create an ado.net transaction in IronPython in asp.net and I’m getting the following error
“couldn’t find member Rollback”

I tried to see what’s different in my ironpython ado.net transaction with a vb.net ado.net transaction but I can’t see the differences or find the reason why one doesnt work and the other does. Perhaps I’m just not seeing something, these are the test codes

VB.NET

Partial Class prueba
    Inherits sql_conexiones

    Sub bt_aceptar_click(ByVal s As Object, ByVal e As EventArgs)
        Dim objTransaction As SqlTransaction
        Dim conpubs As SqlConnection = New SqlConnection("Persist Security Info=False;Data Source=PABLODALMA;Initial Catalog=SistemaHYM;User ID=sa;Password=usuario;Connect Timeout=180")
        Dim strUpdateA As String = "UPDATE bancos SET descripcion_banco = 'prueba' WHERE cod_banco = 1"
        Dim strUpdateB As String = "UPDATE bancos SET descripcion_banco = 'pruebados' WHERE cod_banco = 1"
        Dim cmdUpdateA As SqlCommand
        Dim cmdUpdateB As SqlCommand
        cmdUpdateA = New SqlCommand(strUpdateA, conpubs)
        cmdUpdateB = New SqlCommand(strUpdateB, conpubs)
        conpubs.Open()
        objTransaction = conpubs.BeginTransaction
        Try
            cmdUpdateA.ExecuteNonQuery()
            cmdUpdateB.ExecuteNonQuery()
            objTransaction.Commit()
            Response.Write("ok")
        Catch ex As Exception
            objTransaction.Rollback()
            Response.Write("no ok")
        Finally
            conpubs.Close()
        End Try
    End Sub
End Class

IronPython

import clr
clr.AddReference('System.Data')             # Agrega espacio de nombres Data
from System.Data import *                   #uso esta forma para importar o la otra?
clr.AddReference('System')                  
import System                               # Agrega espacio de nombres System       

def bt_aceptar_click(sender,e):
    objTransaction = System.Data.SqlClient.SqlTransaction
    conpubs = System.Data.SqlClient.SqlConnection("Persist Security Info=False;Data Source=PABLODALMA;Initial Catalog=SistemaHYM;User ID=sa;Password=usuario;Connect Timeout=180")
    strUpdateA = "UPDATE bancos SET descripcion_banco = 'prueba' WHERE cod_banco = 1"
    strUpdateB = "UPDATE bancos SET descripcion_banco = 'pruebados' WHERE cod_banco = 1"
    cmdUpdateA = System.Data.SqlClient.SqlCommand(strUpdateA, conpubs)
    cmdUpdateB = System.Data.SqlClient.SqlCommand(strUpdateB, conpubs)
    conpubs.Open()
    objTransaction = conpubs.BeginTransaction
    try:
        cmdUpdateA.ExecuteNonQuery()
        cmdUpdateB.ExecuteNonQuery()
        objTransaction.Commit()
        Response.Write("ok")
    except:
        objTransaction.Rollback()
        Response.Write("no ok")
    else:
        conpubs.Close()

Something else to say it’s the object inspector is showing very different objects. When VB.NET says

objTransaction System.Data.SqlClient.SqlTransaction

  • Connection System.Data.SqlClient.SqlConnection
  • IsolationLevel ReadCommitted(4096)

IronPython says
objTransaction Microsoft.Scripting.BoundBuiltinFunction with a wider set of subitems. This probably means something related to the problem but I dont have the technical level to know it. There are some references to the object being related to an ado.net transaction, such as “public member” –> instance –> “System.Data.SqlClient.SqlTransaction”.
Is IronPython creating the object I need or it’s just creating another type of object and that’s why I’m getting the error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:30:48+00:00Added an answer on May 13, 2026 at 5:30 am

    I think you may have a minor syntax error. Try adding brackets after BeginTransaction, as follows:

    objTransaction = conpubs.BeginTransaction()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.