which syntax is correct!!! in vb.net

Discussion in 'MCSD' started by sirReadalot, Feb 24, 2004.

  1. sirReadalot

    sirReadalot Guest

    Dim conn as new sqlconnection()
    Dim tran as sqltransaction
    tran = conn.beginTransaction("Serialiable")

    OR

    Dim conn as new sqlconnection()
    Dim tran as sqltransaction
    tran = conn.beginTransaction("IsolationLevel.Serialiable")

    thanks.
     
    sirReadalot, Feb 24, 2004
    #1
    1. Advertisements

  2. Dim conn as new sqlconnection()
    Both. Although I don't think will get the behavior you expect. See the
    documentation for theBeginTransaction method which will tell you why.

    Kline Sphere (Chalk) MCNGP #3
     
    The Poster Formerly Known as Kline Sphere, Feb 24, 2004
    #2
    1. Advertisements

  3. sirReadalot

    Eric Guest

    You need to lose the quotes and change the spelling:

    tran - conn.beginTransaction(IsolationLevel.Serializable);

    Serializable is an enumeration.
     
    Eric, Feb 25, 2004
    #3
  4. sirReadalot

    Eric Guest

    duh - the other answer was right, too. You can't really do this in
    ADO.NET, even if you get the right syntax.
     
    Eric, Feb 27, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.