Click here to Skip to main content
15,891,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In SQL it shows correct Result, but in MS Access 2003 no Data Shows through DataSet. But same query shows result through SQL View in MS Access.
Code is :
C#
string str = "select checktime from CHECKINOUT where UserId=2 and checktime between 04/11/2013 and 04/12/2013";
private DataSet DSet(string str)
    {
        OleDbConnection con = new OleDbConnection(ConnectionString);
        com = new OleDbCommand(str, con);
        oledbda = new OleDbDataAdapter(com);
        DataSet ds = new DataSet();
        oledbda.Fill(ds);
        return ds;
    }

ds Returns no any Data.Please correct it.
Posted
Updated 30-Apr-13 23:08pm
v2
Comments
Pheonyx 1-May-13 5:08am    
Question 1) If you run the query in access itself does it return data?
LebneizTech 1-May-13 5:11am    
YES it returns data

1 solution

Sorry I got Solution.
By using Parametrized Query it shows output.
 
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