TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ashwini bhingole
NA
7
15.7k
I want to count Attendance column and display on textbox
Jan 20 2012 2:59 AM
hi,
i want to count Attendancecolumn and display on textbox.i have the following code but it gives error.give me proper code as soon as possible.
public void countattedence()
{
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\SJPDbase.mdb");
con.Open();
OleDbCommand cmd = new OleDbCommand("select count(Attendance) from dbo_Attandances where Emp_Name='" + cmbName.SelectedItem + "'", con);
//SqlDataReader dr;
OleDbDataReader dr;
dr = cmd.ExecuteReader();
while(dr.Read())
{
//int c = Convert.ToInt32( dr["Attendance"]);
txtprd.Text = dr["Attendance"].ToString();
}
con.Close();
}
Reply
Answers (
3
)
Global Assembly Cache (GAC)
How can i retrieve a child node value from xml in C#