473,408 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Retrive data from Datatable.......

Inbaraj
76
hi...

I have broght the database value to Datatable. Now i want to view that value in text box. Can any one say me how to view the datatable. I tryed the codeing.
Expand|Select|Wrap|Line Numbers
  1.    for(int i=0;i<datatable.Rows.Count;i++)
  2.          MessageBox.Show(datatable.Rows[i].ToString())
but it is printing "System.DataTable.Row" Plz help me...

thanks in advance...

reg
Inbaraj
Oct 16 '07 #1
3 1080
The code should be
Expand|Select|Wrap|Line Numbers
  1. for(int intOuter=0; intOuter<datatable.Rows.Count; intOuter++)
  2. {
  3.        for(int intInner=0; intInner<datatable.Columns.Count; intInner++)
  4.        {
  5.             MessageBox.Show(datatable.Rows[intOuter].ItemArray[intInner].ToString())   
  6.        }
  7. }
Oct 16 '07 #2
Frinavale
9,735 Expert Mod 8TB
The code should be
Expand|Select|Wrap|Line Numbers
  1. for(int intOuter=0; intOuter<datatable.Rows.Count; intOuter++)
  2. {
  3.        for(int intInner=0; intInner<datatable.Columns.Count; intInner++)
  4.        {
  5.             MessageBox.Show(datatable.Rows[intOuter].ItemArray[intInner].ToString())   
  6.        }
  7. }

Thanks for the help GayathriP!

Could you both please use [code] tags when posting code.
An example of posting C# code:
[code=cpp]
//My C# code here
[/code]

An example of posting VB.NET code:
[code=vbnet]
'My Vb.NET code here
[/code]

Thank you!
-Moderator
Oct 16 '07 #3
sorry for that. i will follow the same in future
Oct 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: eric | last post by:
Hi Does any one know how to retrive data from foxpro 2.6 memo field in c#. I just manage to retrive the first row. /Eric
6
by: Tejpal Garhwal | last post by:
I have datagrid filled with some data rows. At the run time i want know how many total rows are there in the data grid ? Any idea ? Any Suggestions ? Thanks in advance Tej
2
by: Terry | last post by:
Any .dll or COM+ for .Net can help me retrive data from a Access file? The table contain several columns and the last one is a container which I store Article; because each article is a little bit...
4
by: Toto | last post by:
Can I retrive a session object by a session ID which is stored in a cookie in my server side code?
2
by: Gian Paolo | last post by:
Hi all on .net 2.0 i have a dataset and a table with some rows. Is there a way to retrive the current row index ? So i can retrive other value of that column... something like...
3
by: =?Utf-8?B?UGV0ZXIgSiwgU2Nhbmlh?= | last post by:
Hello I'm looking for an solution about how to retrive data from an client side located Excel document by using an ASP.Net application. I don't want to upload the file to the server. I just want...
23
nehashri
by: nehashri | last post by:
hi i am designing a database using Ms Access and ASP. i have 3 tables in access namely 'PERSONAL', other as 'POLICY' and 3rd one is named as 'STAFF'. in the contact table i have ID, Name, Children...
1
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
3
by: buterfly0707 | last post by:
hi evryone.. i want to get the text box value to list box . And also i want this textbox value enter into the dabasex table called Area and @ th esame time insert this value to List box. here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.