>Actually Bonnie if you read Michel question both answers where not so right, since you may have a row that is passed to a method as a parameter and in that case you will not have the datatable or dataset variable.
>The correct answer should be assuming you have a row var called myRow
>>myRow.Table.Columns.Count
Excellent point Alexandre!! Michel *did* ask specifically about a row's columns collection, not a table's columns collection. I think we were all sleeping on that one. Good catch! You should get the stars! =0)
~~Bonnie
>
>>Actually, Kevin ... your answer *WAS* way better and correct.
>>
>>Sorry Mike, but your syntax won't cut it (unless you're using a Typed DataSet where you have a DataTable named table), but for a plain old run of the mill DataSet, it needs to be:
>>
>>DataSet.Tables["MyTable"].Columns.Count
>>//or
>>DataSet.Tables[0].Columns.Count
>>'or in VB, substitue () for []
>>
>>
>>~~Bonnie
>>
>>
>>>
In a datatable? dataset.table.columns.count >>>
>>>Jeez, that was SO MUCH BETTER than my reply!!! (haha, just kidding)
>>>
>>>your friend,
>>>Tracy-in-a-bad-mood