Project: Eclipse_Platform_UI
Bug 153975 SQL Data Set editor does not update parameter definition after a query change
Reported: 2006-08-15 15:44:41 | Status: resolved fixed

After a SQL query update that results in changes in SQL parameter definition, the updated parameters are not reflected in the Data Set Editor parameters tab. To reproduce: Create a SampleDB data set with query text "select * from customers where customernumber = ?". Go to the Parameter tab of the data set. It correctly creates a parameter "param1" with Integer type. Define a default value for this parameter to complete the definition. Now edit the query text and update it to: "select * from customers where customername = ? and country = ?". Go to the Parameters tab. A 2nd parameter is correctly created. However the first parameter still has data type "Integer". EXPECTED RESULT: Data type for 1st parameter should be updated to "String", since this is the information returned by the JDBC driver and it has not been modified by the user. Assign the 2nd parameter a default value to complete the definition. Now change the query text back to the original ""select * from customers where customernumber = ?". Go to the Parameters tab. Notice that it still shows 2 parameters, even though the 2nd parameter no longer exists in the SQL. EXPECTED RESULT: the 2nd parameter should be dropped after the query update.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimFrame.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/TrimPart.java