Issue 7325 even with examples

xineroks

New Member
Hi, I'm trying to do a method, but there's allways this mistake 7325.

'QUERY-PREPARE text must have 1 FOR EACH/PRESELECT for each query buffer. (7325)'


I'm searching why I'm wrong for few days. But after looking every examples that I can find, I can't tell why i'm wrong here.

When I don't use a comma in QUERY-PREPARE, it seems to be OK, but when I need it for " FOR EACH PROJET, FIRST [...]", there's an error.
Maybe i'm doing all wrong ?

There's the following code :
Code:
  CREATE BUFFER wl_buffer_query FOR TABLE "{&ATS_PROJET}".
  CREATE QUERY wl_query.

  wl_hb:BUFFER-CREATE ().
  wl_query:SET-BUFFERS (wl_buffer_query).
  wl_query:QUERY-PREPARE ("FOR EACH ":U + wl_q1 + wl_q2 + "NO-LOCK":U + wl_q3). //error 7325, because of the comma ? of wl_q3 in other examples it seems to work, what's wrong here ?



Thank you for reading
 
Last edited:

TheMadDBA

Active Member
If you are using more than one table (buffer) in your query you need to create a buffer for every table and add it to the SET-BUFFERS

Code:
CREATE BUFFER wl_buffer_query FOR TABLE "{&ATS_PROJET}".
CREATE BUFFER wl_second_buffer_query FOR TABLE "{&SOME_OTHER_TABLE}".
CREATE QUERY wl_query.

wl_hb:BUFFER-CREATE ().
wl_query:SET-BUFFERS (wl_buffer_query,wl_second_buffer_query).

Also... in the future use the CODE tags when posting code, it makes it much cleaner for everyone to read.
 

xineroks

New Member
Thank you for replying quickly ! No more error for 7325. Thank you.
Sorry for the code tags. I didn't find it
 

TheMadDBA

Active Member
Thanks Cringer... It would be nice if the menu bar had a code button like it does for bold... having it under the insert button is not really intuitive. Might save you some time editing posts :)
 
Top