Home > Back-end > Through ADOConnetion connect to the database, a list of the query result is always wrong...
Through ADOConnetion connect to the database, a list of the query result is always wrong...
Time:02-04
Through time conditions respectively query data from two tables, and code almost
AdoCon. SQL. The clear; AdoCon. SQL. Add (' select * from table 1 where time & gt; : time '); AdoCon. The Parameters. ParameterByName (' time '). The Value:=Now; AdoCon. SQL. Open;
AdoCon. SQL. The clear; AdoCon. SQL. Add (' select * from table 2 where time & gt; : time '); AdoCon. The Parameters. ParameterByName (' time '). The Value:=Now; AdoCon. SQL. Open;
The first query result is correct, and the second table for more than one, is the record of time=Now, but is obviously greater than
That there is only one difference between two tables: time field is empty, table 1 and table 2 can't be empty, Does that matter?
CodePudding user response:
Put you out of the post to see more, meet the conditions? If meet the conditions, what's the problem? Not can only say that the results of your query conditions with wrong If you don't meet... Countless according to the truth