What exactly does this statement mean?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gecko
    New Member
    • Jul 2008
    • 8

    What exactly does this statement mean?

    Hi everyone,

    I just started out with VB.NET as well as ASP.NET. I'm going through some codes and don't really understand the following:

    Dim abc As String

    abc = objCommand.Exec uteNonQuery().T oString()

    --- I think I know what 'objCommand.Exe cuteNonQuery' is for. And I know what 'ToString' means. But put them together and I get confused.

    I know that eventually "something" is cast into type String and assigned to abc. So what is this "something" ?

    Thanks in advance for your help...
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    ExecuteNonQuery returns the number of rows affected as an integer. For that value to be stored into the String variable abc, it needs to be converted from int to a string using the ToString method.

    Comment

    • gecko
      New Member
      • Jul 2008
      • 8

      #3
      Originally posted by r035198x
      ExecuteNonQuery returns the number of rows affected as an integer. For that value to be stored into the String variable abc, it needs to be converted from int to a string using the ToString method.
      I see! Thanks a lot!

      Comment

      Working...