Personal Technical Diary on Data & Process Models, Data Warehousing, Planning, Techniques, and Memoirs.
Monday, November 05, 2007
Free Code: Stored Procedure Code Generator
The above link provides the following:
1. DBCodeGeneration.zip
Description:
You will find that 80% of all stored procedures in a transaction database are all very predictable and can be auto generated. Using a code generator will save you time and create symmetry within your database which increases predictability and stability for the overall system. This will allow you to focus on the other 20% of the stored procedures which are more complex and critical to the system.
I have found that creating stored procedures that create stored procedures was an easy way to do code generation for your database. Creating a script that depended on Visual Studio is just too bulky and slow to load when you want quick results. This solution I can take with me any were without the need of a complex environment.
Feature List:
1. Creates Get Stored Procedures
2. Creates Set Stored Procedures (Performs Insert or Update process depending on conditions)
3. Creates Delete Stored Procedures
Subscribe to:
Post Comments (Atom)
2 comments:
Great! I am utilizing this methodology for a solution I am building, but I am running into one error - on the GenSetSproc, how do you account for computed columns???????? When I try to generate the statements for tables where there are computed colunms, I get this error:
"The column "row_id" cannot be modified because it is either a computed column or is the result of a UNION operator."
Please, someone help!!!!!
Please reply to ksworthe@gmail.com - thanks for any help you could provide
Nice script! I had been messing with SMSS tools, but this gives me better control of what's generated. This saves me a bunch of typing!
Wout
Post a Comment