Click here to Skip to main content
15,921,716 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello

How to fetch data from database and show in a label.
It will show one by one by click in button or
we can show it through timer control through timer interval.


I think it may be possible through generics.


If any solution then please help me.


Thanks
Posted

Okay, here are the resources you would need for it.

1. Connection String - to connect to DB
2. ADO.NET - to retrieve data from database
3. No idea, how/why Generics came in the scene! Timer control.

Links:
For connection to DB: Connection String[^]!
Info regarding the data communication can be read here: Accessing data with ADO.NET[^]
For periodic tick, MSDN: Timer Control Overview[^]

Try now!
 
Share this answer
 
Comments
Maciej Los 15-May-12 10:10am    
Very good! +5
Sandeep Mewara 15-May-12 11:53am    
Thanks!
Found a similar question here.

how to store values in lables from database[^]

This may be helpful to you

Regards
Sebastian
 
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