 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
siraj Guest
|
Posted: Fri Oct 22, 2004 12:59 pm Post subject: Select query between two datetimes |
|
|
Hi!
I am using c++ builder 5 and MS access 2000.
I connect to access using ADO components.
I am having a problem with select query.
The query is
SELECT ts, conc, fh, fhh, comment FROM archive WHERE (ts between
#10/14/2004 11:24:17 # And #10/20/2004 13:1:42#);
If I open Access 2000 and create a request with the above query,I can see
the result.
But when i execute the same query from C++ builder using TADOQuery
component, I get the error "Parameter object is improperly defined.
Inconsistent or incomplete information was provided."
In c++ builder, if execute the query as
SELECT ts, conc, fh, fhh, comment FROM archive WHERE (ts between
#10/14/2004# And #10/20/2004#);
I have no error and can see the result set.
But I want the query to filter not on date but on datetime. How to enclose
datetime in query .
Please Help,
Thank you in advance
Regards,
Siraj
|
|
| Back to top |
|
 |
siraj Guest
|
Posted: Fri Oct 22, 2004 3:16 pm Post subject: Re: Select query between two datetimes |
|
|
Hi!
Found the Solution on the net.
I have to put the datetimes value in parameters property of the TDAOQuery.
Regards,
Siraj
"siraj" <siraj.sm (AT) omnisens (DOT) ch> a écrit dans le message de
news:4179041c (AT) newsgroups (DOT) borland.com...
| Quote: | Hi!
I am using c++ builder 5 and MS access 2000.
I connect to access using ADO components.
I am having a problem with select query.
The query is
SELECT ts, conc, fh, fhh, comment FROM archive WHERE (ts between
#10/14/2004 11:24:17 # And #10/20/2004 13:1:42#);
If I open Access 2000 and create a request with the above query,I can see
the result.
But when i execute the same query from C++ builder using TADOQuery
component, I get the error "Parameter object is improperly defined.
Inconsistent or incomplete information was provided."
In c++ builder, if execute the query as
SELECT ts, conc, fh, fhh, comment FROM archive WHERE (ts between
#10/14/2004# And #10/20/2004#);
I have no error and can see the result set.
But I want the query to filter not on date but on datetime. How to enclose
datetime in query .
Please Help,
Thank you in advance
Regards,
Siraj
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|