In SQL Server, I can create a dataset with parameters by using the prefix @
(Table1 As T LEFT JOIN
Table2 As C ON T.CodeID=C.CodeID) LEFT JOIN
Table3 As U ON T.UserID=U.UserID
T.TimeIn >= @Date
AND T.TimeIn < DateAdd("n",1,@Date)
I can then access the parameters using the parameter name "Date".
Now I need to make this work with Jet/Access DB as backend. It seems that it does not recognize @ as a prefix for a parameter since it give an error "Error in WHERE clause near '@'". I googled a little and found that jet uses "?" to specify a parameter but the problem is replacing both @Date from the query with ? will create 2 parameters.
What is the 'correct' way to create a parameterized query in a dataset for Jet?