Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone send me the code (vb.net) for retrieve records ( numbers) from sql table

As when I click the checkbox the record will appear in the text box
When I select micle then his record for attendance will apear
Checkbox (Micle) textbox1 (attend days) textbox2( absent days )
Thank you
Posted

query = "select count(*) from table_name where user_id = user_id";
sqlcommand sql = new sqlcommand(query, connection);
datareader reader = sql.executescalar();
int number_of_records = reader.RowCount;



now if you have a column that stores d attendace, u can do this:
select column_name from table_name where user = user_name
 
Share this answer
 
Read about ADO.NET here and it will help you.

Look at these:
MSDN: ADO.NET[^]
MSDN: Accessing Data with ADO.NET[^]

The C# Station ADO.NET Tutorial[^]
Using ADO.NET for beginners[^]
 
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