hi there,
i'm a newbie in progress, and now a little confused about my query here :
the problem is, when i'm running this code on my application, appears this error :
"Incompatible data types in expression or assignment. (223)
FILL of buffer ttmSite with user-supplied query requires that the query be QUERY-PREPARED. (11876)"
I don't understand what this error means.
Any help would be appreciated.
Thx,
Lene
i'm a newbie in progress, and now a little confused about my query here :
Code:
def temp-table ttmSite like mSite.
DEF VAR vchsitelist AS CHAR NO-UNDO.
def var vchQueryStr as char no-undo.
def dataset dsTable for {&DataTable}.
def query qDataSet for {&DataTable}.
def query qTable for mSite scrolling.
def data-source dsrcTable for query qTable mSite keys ( chKdSite ).
def input parameter pchuserId AS CHAR NO-UNDO.
def input-output parameter dataset for dsTable.
buffer {&DataTable}:attach-data-source( data-source dsrcTable:handle ).
FOR EACH master.xusersite WHERE master.xusersite.chuserid = pchuserid NO-LOCK:
ASSIGN vchsitelist = vchsitelist + (IF vchsitelist = '' THEN '' ELSE ',') + master.xusersite.chkdsite.
END.
ASSIGN vchQueryStr = "FOR EACH mSite NO-LOCK WHERE CAN-DO(" + vchsitelist + ",mSite.chKdSite)".
query qTable:query-prepare( vchQueryStr ).
buffer {&DataTable}:set-callback-procedure( "BEFORE-FILL", "preTableFill", this-procedure ).
buffer {&DataTable}:set-callback-procedure( "AFTER-FILL", "postTableFill", this-procedure ).
dataset dsTable:fill().
buffer {&DataTable}:handle:detach-data-source().
the problem is, when i'm running this code on my application, appears this error :
"Incompatible data types in expression or assignment. (223)
FILL of buffer ttmSite with user-supplied query requires that the query be QUERY-PREPARED. (11876)"
I don't understand what this error means.
Any help would be appreciated.
Thx,
Lene