This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using the SQL Project and generating Insert, Update & Delete the parameter names are not generated correctly. Instead of generating parameter names matching the column names, like the generation of the select statement, it creates parameters named param1, param2, param3, etc. This means that I can not easily identify which parameter is which without knowing the SQL statement. See attached project ------------------------------------ KEYWORDS VERSION: ALASKA 200702090600 (KENAI) TEAM: FAST
Created attachment 38711 [details] Example Project
Pavan, please look into this
Filed after Bug Cut-off date and is not STOPPER for Beta. If you disagree then please rise priority to P1 and remove waiver keyword.
When we give SQL statements with parameters, the database drivers does not give the parameter names in the parameter metadata that they return.We get the parameter type so we give the parameter name as param[i] and associate the parameter type with it. For example, we have a sql statement "insert into employee values (?,?,?,?,?)". We will get 5 parameters with parameter names param1,param2,param3,param4,param5. The request part in the Message section in the wsdl generated contains these parameters with their types. For select statements also we wont get the parameter names. for example if we have employee table with 5 columns emp_no,ename,name,sal,deptno and we give a statement called "select * from employee". Here we get the resultset metadata and not the parameter metadata.The database drivers return the names of the columns when they return the resultset metadata.We use this resultset metadata to generate the response parts where as we generate the request parts using the parameter metadata (in messages in WSDL).As we dont know the parameter names we generate th parameter names as param1,param2,param3,param4,param5.................. For example, if we have an employee table with 5 columns emp_no,ename,name,sal,deptno) and we give a statement "select * from employee where emp_no = ?" Here we have one parameter and the parameter name will be param1. and we have one resultset with columns having the column names. the message in the wsdl reflecting to this sql contains the request part with param1, its type and response part with the 5 column names and column types. Please let me know if you have any questions.
Ok I understand that you are using the resultset metadata to generate response parts but this does not produce a user-friendly WSDL file, especially because I can't edit those names and guarantee that they will exist after the next Clean & Build, because the user of the WSDL must know the structure of the SQL statement. If you consider that the SQL files you are working on contains the names of columns we should be using these values for the parameter names for Inserts / Updates / Deletes; i.e. where the ResultSet information can not be used.
Removed EP551_WAIVER_APPROVED