Iam using data set and create table adapter then create select some data to be used in my aplication. In my app, i create data table to gain data from table adapter, but i don't know how to get some specific data, ex : item in column "a". Could you resolve it? Thanks :)

So you have used a dataAdapter to fill a dataTable. The items in the dataTable can be accessed using notation like this:

string sample = dt.Rows[0][1].ToString();

This is accessing the second element in the first row of the dataTable and storing it in a string variable. You can use column names rather than indexes if you prefer.

thanks! but the syntax should be like :

Dim sample as String = dt.Rows(0)(1).ToString()

:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.