Mario
19th July 2010, 21:59
used a query.extend.order in before.program to sort the records on the form.
if I compile: query.extend.order("tdpur401.orno DESC"), no problem for the compiler. But if you give 'last record' in the session, you get error 302.
the eventviewer shows the query :
SELECT tdpur401.*,
tcibd001.dsca,
tcibd001.cuni,
tccom120.ocus,
tccom120.seak,
tdpur400.odis,
tdpur400.ccur
FROM tdpur401,
tcibd001,
tccom120,
tdpur400
WHERE tdpur401._index8 = { :tdpur401.item}
AND tdpur401.item REFERS TO tcibd001 PATH tdipu001.item UNREF CLEARUNREF
AND tdpur401.otbp REFERS TO tccom120 AND tdpur401.orno REFERS TO tdpur400
ORDER BY tdpur401.orno DESC desc,tdpur401.item desc,tdpur401.pono desc,tdpur401.sqnb desc"
Message : FATAL ERROR: Error 302 (SQL syntax not correct) on sql statement
Can not continue in tdpurc542m003 in DLL: ottstpstandard (sql.parse.stp)[sql.parse]
If i change it to lower case : query.extend.order("tdpur401.orno desc"), it works OK.
I gues the main table query does not show 'DESC desc' anymore, can you also see the query in a session if nothing goes wrong?
LN 8.5 fp5
if I compile: query.extend.order("tdpur401.orno DESC"), no problem for the compiler. But if you give 'last record' in the session, you get error 302.
the eventviewer shows the query :
SELECT tdpur401.*,
tcibd001.dsca,
tcibd001.cuni,
tccom120.ocus,
tccom120.seak,
tdpur400.odis,
tdpur400.ccur
FROM tdpur401,
tcibd001,
tccom120,
tdpur400
WHERE tdpur401._index8 = { :tdpur401.item}
AND tdpur401.item REFERS TO tcibd001 PATH tdipu001.item UNREF CLEARUNREF
AND tdpur401.otbp REFERS TO tccom120 AND tdpur401.orno REFERS TO tdpur400
ORDER BY tdpur401.orno DESC desc,tdpur401.item desc,tdpur401.pono desc,tdpur401.sqnb desc"
Message : FATAL ERROR: Error 302 (SQL syntax not correct) on sql statement
Can not continue in tdpurc542m003 in DLL: ottstpstandard (sql.parse.stp)[sql.parse]
If i change it to lower case : query.extend.order("tdpur401.orno desc"), it works OK.
I gues the main table query does not show 'DESC desc' anymore, can you also see the query in a session if nothing goes wrong?
LN 8.5 fp5