>>张剑波
OPEN MODE
Mode in which SQL Links opens the SQL database. Possible values are READ/WRITE and READ ONLY.
Note: Setting OPEN MODE to READ ONLY affects operations from the application user interface,
but has no effect on passthrough SQL.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 是否因为这个?
Default: READ/WRITE
呵呵,你既然用sql update/insert/delete怎么readonly法?除非用没有写权限的用户登录才能阻止之。
不过,一般不会让用户写sql吧?如果是,只Open,不ExecSql就可以了。或者检查关键字:
if uppercase(copy(qry1.sql[0],1,6) <> 'SELECT' then
begin
showmessage('Only select is allowed!');
exit;
end;