Click here to Skip to main content
15,892,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,
I need to fetch record in Text Box in Windows Form Application,however I've also used grid view for fetching record form database.
For example:- I have a table with cust name in sql contain fields ID,Name,Address
and in Windows Form I've used one Grid_view to fetch record,and additonal three text boxes which are intended to fetch record on the basis of ID(primary key) which will be given in a text box.

I'm puzzling with logic since I've already used one Data Adapter,Data Set,Data Row,and SQL command builder for Grid View ,however Grid view functioning well.

I'll really very appreciate you if you provide me proper solution.

thanks...........
Posted
Comments
[no name] 22-Aug-12 4:41am    
could you pls write the code here..???
ridoy 22-Aug-12 4:45am    
ok,confusing what you tell.Let me short,u have database and you want to populate your textbox with those database value?
Ravindra Bisht 22-Aug-12 7:49am    
yes ridoy,but value will be fetched on the basis what ID is entered in fourth text box which is additional text box for tracking purpose and field are only three in database.
Ravindra Bisht 22-Aug-12 7:50am    
plz provide me source code,
[no name] 22-Aug-12 9:55am    
"I'm puzzling"... what is puzzling is that you say you already know how to do this so why are you asking? No one can provide you the code to do this since we cannot possibly know anything about your database.

1 solution

If you want to populate your data in textboxes then try to use DataReader. In this way you can fetch the data rowwise from database and show in textbox.
 
Share this answer
 

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