loay
asked on
select statment using vb.net and access 2000
hi
i have a table in access 2000 (empno,ampname,hiredate) and i am using vb.net forms to build the application ,,, now i want to retrive all the employees who started thier work between 2 dates i tried many select staments like below but they are not working
com.CommandText = "select * from emp where empdate >= '" & CDate(txtDate1.Text) & "' And empdate <= '" & CDate(txtDate2.Text) &"' ;"
please how can i solve it thanx
i have a table in access 2000 (empno,ampname,hiredate) and i am using vb.net forms to build the application ,,, now i want to retrive all the employees who started thier work between 2 dates i tried many select staments like below but they are not working
com.CommandText = "select * from emp where empdate >= '" & CDate(txtDate1.Text) & "' And empdate <= '" & CDate(txtDate2.Text) &"' ;"
please how can i solve it thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
com.CommandText = "select * from emp where empdate >= " & CDate(txtDate1.Text) & " And empdate <= " & CDate(txtDate2.Text) &""
don't need a ; ever......
u dont need the cdate either could be
com.CommandText = "select * from emp where empdate "'" & txtDate1.Text & " And empdate <= " & txtDate2.Text &""