I have a DataWindow in a PB10.5 application which works perfectly until I add a WITH clause to the top of the SQL query that sits behind. The query painter accepts it as valid syntax, and if I manually retrieve the data in the DataWindow painter, it works perfectly there too. The problem comes when running the application where the retrieve consistently returns -1. Can anyone tell me why this might be happening and what I can do to prevent it?

有帮助吗?

解决方案

You could look what returns sqlca.sqlerrtext (providing that the current object transaction is the default sqlca, you may need to adapt that) just after the -1 return by retrieve() it should help.

You could also put a breakpoint into the DW dberror() event to look if there is something useful here in case of error.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top