Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I'm developing a desk top application.

I want to call the data from the table and display in the text box as under.

txtamt.Text = drSQL.Item("amount").ToString()

In that way to define each field in each text box one by one.

The problem occures when the field are more that 40 to 50 fields.

Pl guide how to reduce the code....

Thanks


Jatinder Gupta
Posted

1 solution

why dont you use datasets, along with databindings!?

you can have a dataset, load your data in it, and set Databindings.Text to suitable column name.

here is an example :
http://www.akadia.com/services/dotnet_databinding.html[^]

-----------------------
Regards

H.Maadani
 
Share this answer
 
Comments
Jatinder Gupta 21-Aug-10 22:23pm    
Thanks the example is sutiable to fulfill the requirement.

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