I just realized that I had mis-typed the code example I had posted previously for type DataSets. Sorry guys. Here's the correct syntax:
dsCustomers.Customers[0].cCustName.ToString();
Notice now that there is no mention of the Rows[] collection. Customers[0] is the first row in the table, Customers[1] is the next, and so on. The only thing that you use Rows for in this scenario is for a record count.
MyCount = dsCustomers.Customers.Rows.Count;
Sorry about the typo -- I hope it didn't confuse anyone.
~~Bonnie
>Jorge,
>
>In addition to Cathi's reply, I'd like to add something and hope it doesn't further confuse you. Another option when using DataSets is to have .NET generate a typed dataset for you (right click in your .xsd and click on the Generate option). The syntax is easier to handle. Your example would then be:
>
>
> dsCustomers.Customers.Rows[0].cCustName.ToString();
>
>
>A typed DataSet allows Intellisense to kick in for both your table names and your column names, which you don't get with just a regular DataSet. Also notice that I used a Rows[0], rather than [1]. Don't forget that the Rows collection is zero-based.
>
>~~Bonnie
>