Hi I have an access database and in database i create Three Table First Table Name Is Attandance, Second is Template And Third is Absent i want to filter which data not in Attandance filter by Only Today Date from Template table and i don't want old dated User ID and Insert in Absent Table
Table Details
Attandance Field = TemplateID(AutoNumber), UserID(Number),State(Text),Att_Date(Date/Time)
Template Field = TemplateID(AutoNumber),UserID(Number),Full_Name(Te xt),Age(Number)
Absent Field = TemplateID(AutoNumber), UserID(Number),State(Text),Att_Date(Date/Time)
my Coding as under but its its not working
string[] mylist = new string[3000];
int i = 0;
str = "select a.*,b.* from Template a, Attandance b where a.UserID=b.UserID and ATT_Date="+mydate+"";
cmd = new OleDbCommand(str, conn);
OleDbDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
String ddate = dr[14].ToString().Substring(0, dr[14].ToString().Length - 11).Trim();
if (ddate.Trim().Equals(mydate.Trim()) == false)
{
mylist[i] = dr[1].ToString();
i++;
dt.Rows.Add(dr[1].ToString(), dr[6].ToString(), dr[7].ToString() + dr[8].ToString(), dr[9].ToString(), dr[10].ToString(), ddate);
}
}
dr.Close();