what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction = myconnection.Be ginTransaction( ))" 8 1400
If I'm not mistaking:
dim mytransaction as SQLiteTransacti on = myconnection.Be ginTransaction( )
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:eO******** *****@TK2MSFTNG P03.phx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
there's no equivalent (as far as I know) for a C# using in VB... the C#
using creates the object and disposes it at the end and VB using is just for
shortcuts... There's not relation at all between the two....
the equivalent would be to dim your variable and dispose it explicitly in
your code when you don't need it anymore...
I hope it helps
ThunderMusic
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot coma écrit dans le message
de news: eO************* @TK2MSFTNGP03.p hx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
There is certainly an equivalent in either 2003 or 2005:
2005:
Using mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
2003:
Dim mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
Try
foo
Finally
CType(mytransac tion, IDisposable).Di spose()
End Try
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter
"Jon Paal" wrote:
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction = myconnection.Be ginTransaction( ))"
In Framework 2.0, you can use Using.
Using mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
In version 1.1, there is no true equivalent, although you can accomplish the
exact same thing in either 1.1 or 2.0 with this:
Try
Dim mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
Finally
Dim disposableObjec t as IDisposable = CType(mytransac tion, IDisposable)
disposableObjec t.DIspose()
End Try
Note, however, that casting as IDisposable merely imitates the action of
Using and does not add a real Dispose() method to the class.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA http://gregorybeamer.spaces.live.com/
*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:eO******** *****@TK2MSFTNG P03.phx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
That won't quite compile - see my earlier post Gregory.
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter
"Cowboy (Gregory A. Beamer)" wrote:
In Framework 2.0, you can use Using.
Using mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
In version 1.1, there is no true equivalent, although you can accomplish the
exact same thing in either 1.1 or 2.0 with this:
Try
Dim mytransaction As SQLiteTransacti on = myconnection.Be ginTransaction( )
Finally
Dim disposableObjec t as IDisposable = CType(mytransac tion, IDisposable)
disposableObjec t.DIspose()
End Try
Note, however, that casting as IDisposable merely imitates the action of
Using and does not add a real Dispose() method to the class.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA http://gregorybeamer.spaces.live.com/
*************** *************** *************** ****
Think Outside the Box!
*************** *************** *************** ****
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message
news:eO******** *****@TK2MSFTNG P03.phx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
the question is... why would you convert a C# project into VB? they are
both alike and C# offers a bit more things over VB... I can't see why
someone would convert a C# project into VB...
ThunderMusic
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot coma écrit dans le message
de news: eO************* @TK2MSFTNGP03.p hx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
it's not a C# project...
"ThunderMus ic" <NO.danlat.at.h otmail.com.SPAM wrote in message news:uc******** ******@TK2MSFTN GP05.phx.gbl...
the question is... why would you convert a C# project into VB? they are both alike and C# offers a bit more things over VB... I
can't see why someone would convert a C# project into VB...
ThunderMusic
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot coma écrit dans le message de news: eO************* @TK2MSFTNGP03.p hx.gbl...
>what is vb equivalent to this C# code ? converters failed to handle this
"using (SQLiteTransact ion mytransaction = myconnection.Be ginTransaction( ))"
I was working offline when I wrote and sent as soon as I got hooked back up,
so I did not see your response until today. I will mark that one down. I
also did not test the code, but I am more a C# guy, if that gives me any
points. :-)
More important than the transaction is the connection object, which does
have a Dispose() method and SHOULD be disposed.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA http://gregorybeamer.spaces.live.com
*************** *************** *************** ****
Think outside of the box!
*************** *************** *************** ****
"David Anton" <Da********@dis cussions.micros oft.comwrote in message
news:B0******** *************** ***********@mic rosoft.com...
That won't quite compile - see my earlier post Gregory.
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter
"Cowboy (Gregory A. Beamer)" wrote:
>In Framework 2.0, you can use Using.
Using mytransaction As SQLiteTransacti on = myconnection.B eginTransaction ()
In version 1.1, there is no true equivalent, although you can accomplish the exact same thing in either 1.1 or 2.0 with this:
Try Dim mytransaction As SQLiteTransacti on = myconnection.B eginTransaction () Finally Dim disposableObjec t as IDisposable = CType(mytransac tion, IDisposable) disposableObjec t.DIspose() End Try
Note, however, that casting as IDisposable merely imitates the action of Using and does not add a real Dispose() method to the class.
-- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA http://gregorybeamer.spaces.live.com/
************** *************** *************** ***** Think Outside the Box! ************** *************** *************** ***** "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot comwrote in message news:eO******* ******@TK2MSFTN GP03.phx.gbl...
what is vb equivalent to this C# code ?
converters failed to handle this
"using (SQLiteTransact ion mytransaction =
myconnection.Be ginTransaction( ))"
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
Is there an equivalent of COM on Linux that I can get through Python.
My need is to have some sort of language independent component
framework. I can think of CORBA but I have to have a server running. I
prefer not to. I just need Python components for local consumption in
other languages. I remember Gnome libs having some thing like this.
Any thoughts?
|
by: Michael Foord |
last post by:
Please pardon my ignorance on this one - but I'm not certain how the
sign bt is treated in python bitwise operators. I've trying to convert
a javascript DES encryption routine into python.
Javascritp has >>> and >>. >>> is a zero fill bit shift whereas >> is
a sign propagating bit shift. My understanding is that the python >>
is equivalent to the javascript >> - but python has no equivalent to
>>>.
Would a >>> 3 in javascript be...
|
by: Robert Dodier |
last post by:
Hello,
Here's a thought that I'm sure has already occurred to
someone else, I just can't find any record of it yet.
An XML document is just a more verbose and clumsy representation
of an ordinary Lisp S-expression. So it's easy enough to translate
some XML into equivalent Lisp. Now I turn it over to the Lisp
parser, which creates the equivalent of the DOM for me.
|
by: Vannela |
last post by:
Is there any equivalent control in .NET for the Power
builder DataWindow control?
I am explaining the Datawindow architecture to some extent.
Power Builder DataWindow Control has got different
presentation styles and different data sources.
Presentation styles like tabular format , graph format,
grid format, freeform format, Composite format(somthing
|
by: Frank Rachel |
last post by:
So I can focus on the correct areas of research, I was wondering if someone
could give me the .NET equivelents for this J2EE architecture:
JSP's make calls to local JavaBean Controls. The controls do a JNDI lookup
to invoke methods on EJB's. The EJB's use local Java classes, and these
classes use JDBC to do database work.
Example:
Login.jsp contains "import xxx.LoginControl", and invokes the "login"
| |
by: Marty |
last post by:
Hi,
What is the VB.NET equivalent of the VB6 ADODB.Connector and
ADODB.Recordset?
Thanks
Marty
|
by: Tim Conner |
last post by:
Hi,
I am an ex-delphi programmer, and I having a real hard time with the
following simple code (example ):
Which is the equivalent to the following code ?
var
chars : PChar;
sBack, s : String;
|
by: karch |
last post by:
How would this C# contruct be represented in C++/CLI? Or is it even
possible?
PolicyLevel level = (enumerator->Current) as PolicyLevel;
Thanks,
Karch
|
by: Alan Silver |
last post by:
Hello,
I'm converting some old VB6 code to use with ASP.NET and have come
unstuck with the Asc() function. This was used in the old VB6 code to
convert a character to its ASCII numeric equivalent.
Is there such a function available in C#? I can see that VB.NET has one,
but I couldn't see how to get at it in C#.
For example, if I have ...
|
by: grid |
last post by:
Hi,
I have a certain situation where a particular piece of code works on a
particular compiler but fails on another proprietary compiler.It seems
to have been fixed but I just want to confirm if both statements are
similar :
*((char **)v)++ == *((char **)v++)
Where v is a pointer to an array of characters,defined as
char *v;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |