|
-
April 17th, 2003, 12:21 PM
#1
Little confusion!
check this statement
objTable.Rows(0).Item("name")
this statement extract value of name column from the given DataTable object reference. Here Rows is DataTable propery which returns DataRowCollection but Item is a property of DataRow class so is it possible to return DataRow object refenrence from Rows property and use Item property.
what i think it is doing is, it is using Item property of DataRowCollection class to get the required row and then using Item property of that returned row to get the value of column name. but again if it is so how is it happening be hind the scene.
plz make me clear this concept
-
April 17th, 2003, 01:36 PM
#2
objTable.Rows(0).Item("name") is the same as
Row = objTable.Rows(0)
Item = row.Item("name")
-
April 18th, 2003, 02:47 PM
#3
Well, the ITEM in DATAROWCOLLECTION is type of DATAROW. So when you .ROWS(0), you're retrieving the DATAROW item from the DATAROWCOLLECTION.
-Cool Bizs
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
|