|
-
Apr 27th, 2007, 06:48 AM
#1
Thread Starter
Member
Using ! as method
Hi all.
I've the following code:
MyTable.Item("COD_Original") = txtUtente.Text
And I would like to call the .item method, the following way:
MyTable!COD_Original = txtUtente.Text
The last way is the way it's done in VB6, using an ADODB.Recordset. I need this in order to convert applications from VB6 to VB.net easly! Anyone know how to pass a field name and value like this?
Thanks in advance!
-
Apr 27th, 2007, 07:01 AM
#2
Re: Using ! as method
Pretty sure that operator's gone. You'll need to convert the code to use the former.
If you have a lot of files you could do it using a regular expression. However, if it's all VB6 code, I suggest you rewrite it in .NET from scratch. There's not a lot of point in trying to convert legacy code since the programming model is so different.
-
Apr 27th, 2007, 07:08 AM
#3
Thread Starter
Member
Re: Using ! as method
I know the programming model is different. And we´re using native .net code. We're rewrite the ADO.Recordset, into one class wich has the methods we're used to. .open, .delete, .movenext... we call the method, but the original vb.net code is beneath it. We just want to accelarate the development time in the future, will i'm now scouting .net and implementing the funcionalities needed in order to accelarate the development.
So... the ! operator ir really gone? Bad news =\
-
Apr 27th, 2007, 07:11 AM
#4
Re: Using ! as method
I can't see why it's such a big deal. If you were worried about saving a few characters you'd use C# instead.
-
Apr 27th, 2007, 08:02 AM
#5
Re: Using ! as method
 Originally Posted by Ph0b0s
So... the ! operator ir really gone? Bad news =\
Actually good news, since using the "!" collection lookup operator for database column values was a bad and inefficient programming practice in most cases.
-
Apr 27th, 2007, 08:34 AM
#6
Thread Starter
Member
Re: Using ! as method
 Originally Posted by bgmacaw
Actually good news, since using the "!" collection lookup operator for database column values was a bad and inefficient programming practice in most cases.
I wasn't questioning the efficience, sure it's gone for some reason!
Well... time to adapt then. Thanks all!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|