Click here to Skip to main content
14,866,397 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
HI, i m developing a simple CRM.

In this i have to retrieve data from database one by one.There are two tables, t1 contain 4 fields and t2 contain 8 fields. I m using data reader but it gives me any row(mostly the last row), i want the rows to appear serially, one by one.what i want is that initially 1st row should appear then its values should filled in 4 text boxes, there are 4 blank text boxes except the above one and these should be filled later and then it is submitted through a submit button. this new data of 8 fields is stored in table t2. then the next data from t1 should appear in first 4 text boxes and remaining text boxes are filled and this data should be submitted through submit button. it must run in this way until the whole data of t1 is sent to t2. plz help me..... i want to solve it asap.....

Thanks in advance....
Posted
Updated 5-Jun-13 2:34am
v3
Comments
Rockstar_ 5-Jun-13 8:14am
   
Confusing, make it clear...?
Maciej Los 5-Jun-13 8:23am
   
And issue is...
Nandakishore G N 5-Jun-13 8:37am
   
paste what have you done till now.

1 solution

You don't have to get the rows one by one, get a Datatable using the SQL query of your choice and then iterate through the rows in C# using the foreach keyword.

Cheers,
Edo
   
Comments
shalini2 11-Jun-13 5:48am
   
Thanks for this help.... :) :)
Joezer BH 11-Jun-13 7:00am
   
You are welcome.
Do you need help with the implementation?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900