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. Advertising

  2. >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")


    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. Advertising

  3. sirReadalot

    Eric Guest

    sirReadalot wrote:

    > 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.


    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

    Eric wrote:

    > sirReadalot wrote:
    >
    > > 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.

    >
    > You need to lose the quotes and change the spelling:
    >
    > tran - conn.beginTransaction(IsolationLevel.Serializable);
    >
    > Serializable is an enumeration.


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Joines

    interface configuration name syntax

    Jason Joines, Jul 21, 2004, in forum: Cisco
    Replies:
    2
    Views:
    447
    slipstream_242
    Jul 21, 2004
  2. Guest
    Replies:
    0
    Views:
    446
    Guest
    Feb 24, 2004
  3. chrisgibson
    Replies:
    0
    Views:
    463
    chrisgibson
    Aug 26, 2006
  4. jim evans

    Correct White Balance Doesn't Mean Correct Color??

    jim evans, Oct 21, 2005, in forum: Digital Photography
    Replies:
    28
    Views:
    953
    Dave Martindale
    Dec 27, 2005
  5. Armen Kirakosyan

    Which is correct?

    Armen Kirakosyan, Jun 25, 2005, in forum: MCSA
    Replies:
    11
    Views:
    507
    Steve
    Jun 27, 2005
Loading...

Share This Page