First, check SYBase's help for the BETWEEN clause; in SQLServer, it doesn't work like in VFP! Also, I don't think that you can use just the 4 first letters of a command (SELE for SELECT) like in VFP.
Try this:
SELECT * FROM clk
WHERE date_time BETWEEN '20000925 23:00:00' AND '20000925 23:00:00'
Finally, you can use AERROR() to find out what went wrong with your SQL command.
>I have an SYBASE database that I am linking via SQLConnect.. (works)
>However the query I need to run is based on 2 date_time fields
>i.e.
>
>sele * from clk where between(date_time,start,end)
>
>How do I build this string so that it will execute with the SQLExec command?
>
>If I convert everything to a string,
>i.e.
>sele * from clk where between(date_time,2000/09/25 23:00,2000/09/26 23:00)
>
>the SQLExec returns -1.
>
>I have created a view to do this, however, all I really want is a query.
>
>Any ideas?
>
>TIA,
>Mike
Sylvain Demers