Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCSD > which syntax is correct!!! in vb.net

Reply
Thread Tools

which syntax is correct!!! in vb.net

 
 
sirReadalot
Guest
Posts: n/a
 
      02-24-2004
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.

 
Reply With Quote
 
 
 
 
The Poster Formerly Known as Kline Sphere
Guest
Posts: n/a
 
      02-24-2004
>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
 
Reply With Quote
 
 
 
 
Eric
Guest
Posts: n/a
 
      02-25-2004
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.
 
Reply With Quote
 
Eric
Guest
Posts: n/a
 
      02-27-2004
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax Checker that's better than the normal syntax checker Jacob Grover Ruby 5 07-18-2008 05:07 AM
Syntax bug, in 1.8.5? return not (some expr) <-- syntax error vsreturn (not (some expr)) <-- fine Good Night Moon Ruby 9 07-25-2007 04:51 PM
[ANN] SqlStatement 1.0.0 - hide the syntax of SQL behind familiarruby syntax Ken Bloom Ruby 3 10-09-2006 06:46 PM
Microcontrollers: which one ? which language ? which compiler ? The Jesus of Suburbia NZ Computing 2 02-11-2006 06:53 PM
Syntax highligth with textile: Syntax+RedCloth ? gabriele renzi Ruby 2 12-31-2005 02:44 AM



Advertisments