begin_date = Date("2002-02-23")
end_date = Date("2002-01-02")
condition = "select * from room where Date(:begin_date) > Date(:end_date)"

prepare sqlsa from : condition;
describe sqlsa into sqlda;
declare my_cursor dynamic cursor for sqlsa;
open dynamic my_cursor using descriptor sqlda;
fetch my_cursor using descriptor sqlda;
if(sqlca.sqlcode = -1) then 
    messagebox("Error:", "Failed to execute the sql statement")
elseif sqlca.sqlcode = 100 then
    messagebox("Error:", "Not found the data")
else
    
上面这段代码为什么总是查询出错呢?难道动态查询语句里面不允许有自己定义的变量?
"select * from room where Date(:begin_date) > Date(:end_date)"
当然了,这个查询条件纯粹是为了测试而加入的