Generating a Package to Insert Data into a Table

Hi all,

Is there an option in PL/SQL Develpoer 7.1, from a table to generate a packaged procedure which is used for inserting data in to the table?

For example, if we right click (or any other option) a table, there should be an option which will create a package. The package contains prcedure and insert scripts which will inser data into the table. The frontend application (or whereever an insert happens to the table), will call this procedure passing all the inputs as parameters. So that if there is any change in the number of columns in the table, we need not to change in all the places it insert the data into the table. Just we need to change this procedure alone.

Thanks in advance!
 
In our company, we have developed a set of packages that dynamically (based on the database views all_tables, all_tab_columns, all_constraints, all_cons_columns, all_indexes, all_ind_columns) for each table generates a database package with methods for inserting and fetching records from the database based on primary/unique keys and unique indexes.

These packages are in turn used in dynamically generated functions that makes insert statements for each table and return them in an array to be spooled to a file or similar.
 
I wrote a DAO plugin for this very thing. Right click on table, you can generate a package that contains save (conditional insert or update), delete, and list. Send me a PM if interested, I'll mail it to you.
 
Last edited:
Back
Top