Question

So I have a string with a large sql query named sql_select. And I have the following code in PowerBuilder 10.5:

dw_1.Modify( "DataWindow.Table.Select=' "+ sql_select + "'" )
messagebox("Something", dw_1.getsqlselect())

I see that I do not get the full query, i.e., some conditions do not exist! Even though the sql_select is right. What is the problem?

Was it helpful?

Solution

You should get the result of the dw_1.modify() call into a string variable. If there is any problem from the syntax, you should get an error message in the string. If there is no problem for Modify() the string will remain empty.

OTHER TIPS

You may also be passed through the method of the object setsqlselect datawinow. But the return value is not readily exploitable being -1 on error occur...., and 1 if it passes.

Did you have the same number of column in your query and you dataobject?

Did you try to execute the query stocked in sql_select with your DBMS?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top