| Summary: | Saved default SQL statement for Get fails in execution | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Hoffman <hoffmanp> | ||||||
| Component: | EDT | Assignee: | Zhi Zhu <zhuzhi> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | chenzhh, jspadea, jvincens | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 204695 [details]
Library to load database for test case
Seems this is a SQL generator problem, if it belongs to SQL UI problem, please assign back to me. If a statement contains a #SQL{} clause which contains a ? the user is responsible for adding a USING clause to populate the ?'s in the #SQL. Generation can't add a default USING if there is an #SQL because the #SQL could contain variables, so the actual #SQL is not know at generation time and the generator won't know that the SQL contains ?.
Our sql tooling (ctrl 1) should create statements that fully functional. In this case our tooling is adding the #SQL clause that contains ?'s and is not adding a using so the statement is not functional.
If the sql added by the tooling contains ?'s then the tooling should add the using to make the statement valid and perform like the default generation.
Code is not delivered since cannot deliver now This problem is not fixed. Save after Cntl-1 still produces SQL statement without the required using clause. Paul, can you paste your GET statement in the bug commnet? I'm marking this as resolved because I tried it on an install and it is now adding a 'using' and the attached test case runs successfully. Maybe it didn't make it into the build the day Paul tested it.
Using the attached egl files.
I pressed Cntl-1 on row in the following statement:
get row from ds;
Select Add SQL Statement and I see:
get row from ds using(row.id) with
#sql{select id, aChar, aString, afloat, aInt, aSmallInt, aBigint
from MINITBL
where
id = ?
};
when I run the test I get:
connect to jdbc:derby:/home/jvincens/eclipse/rbdDev/derby/SAMPLE
Check row 1
Check row 10
default get
success
saved default with added using clause
success
saved default with no modification
success
Verified and closed. |
Created attachment 204694 [details] Test case for defect UI allows you to hit ctrl, 1 to save default SQL statement in the EGL program. For statement "get record from sqldatasource" the default statement works when it is not expanded, but fails when it is expanded into the program. Adding a "using" clause makes the statement work. The using clause should be included when the default statement is saved in the program. See attached test case. Test output: default get success saved default with added using clause success saved default with no modification Failure: Exception = At least one parameter to the current statement is uninitialized.: [sqlstate:07000][sqlcode:30,000]