>USE (m.lcTableName) > >SELECT cmpid, ts, IsUpdated FROM m.lcTableName ; >WHERE IsUpdated > 0 INTO CURSOR local_cursor > >**! Form retrieve from server list >SQLEXEC(this.connhandle, ; >"select cmpid, ts, IdDeleted from companies where ts < "+TTOC(settings.lastupdate,1), "remote_cursor")This would need either single quotes around the datetime that's been converted to text:
SQLEXEC(this.connhandle, ; [select cmpid, ts, IdDeleted from companies where ts < ']+TTOC(settings.lastupdate,1)+['], "remote_cursor")or better yet, just pass it as a parameter:
SQLEXEC(this.connhandle, ; "select cmpid, ts, IdDeleted from companies where ts < ?settings.lastupdate", "remote_cursor")>*** Should here we use {} ??