Results 1 to 6 of 6

Thread: Using ! as method

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    38

    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!

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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.

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    38

    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 =\

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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.

  5. #5
    Fanatic Member bgmacaw's Avatar
    Join Date
    Mar 2007
    Location
    Atlanta, GA USA
    Posts
    524

    Re: Using ! as method

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

  6. #6

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    38

    Re: Using ! as method

    Quote 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
  •  



Click Here to Expand Forum to Full Width