retrive single fieald form database
-
Hi all, i have table inside dataset there is a one row and one columne i need to retrive this value into string thanks haytham
webhay wrote: i have table inside dataset there is a one row and one columne i need to retrive this value into string Say, the dataset is called dset, for some reason! then dset.Tables[0].Rows[0].ItemArray[0].ToString() should retrieve the first column in the first row in the first table, which you seem to be absolutely certain of.:wtf::confused: Cheers! Looney Tunezez "If you build it.... .....BUGS will come!" -JB
Application.Run(new Form1(this.Dispose())); <--WHAT :wtf::confused::eek:
"Stability. What an interesting concept" - Chris Maunder -
webhay wrote: i have table inside dataset there is a one row and one columne i need to retrive this value into string Say, the dataset is called dset, for some reason! then dset.Tables[0].Rows[0].ItemArray[0].ToString() should retrieve the first column in the first row in the first table, which you seem to be absolutely certain of.:wtf::confused: Cheers! Looney Tunezez "If you build it.... .....BUGS will come!" -JB
Application.Run(new Form1(this.Dispose())); <--WHAT :wtf::confused::eek:
"Stability. What an interesting concept" - Chris Maunderyou can use SqlDataAdapter you are welcome to visit my blog
-
Hi all, i have table inside dataset there is a one row and one columne i need to retrive this value into string thanks haytham
Assuming you want row x, column y, and assuming the DataSet object is named "ds" and DataTable's TableName is "MyTable", how about:
object value = ds.Tables["MyTable"].Rows[x][y];
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’