Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

first column value in a datatable

Tags:

vb.net

I have a dataset with just 1 datatable and 1 row but with 2 columns. I want to get the value of the 1st column. How can I get it in vb.net

like image 443
acadia Avatar asked Jul 03 '26 06:07

acadia


1 Answers

All you need is

ds.Tables(0).Rows(0)(0)

where ds is the name of your DataSet object. This will return the first column from the first row of the first table as an Object.

like image 172
John M Gant Avatar answered Jul 06 '26 04:07

John M Gant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!