It is cool to see this recent article on Code Project that describes an insert and update SQL query code generator using Information_Schema.Tables and GetSchema - two recent topics that I have discussed recently on my blog:
The code generator interface even looks similar to my Database Explorer and Code Generator Tool I made that not only generates Select, Insert, Update, Delete, Paging, and Select by Foreign Keys Queries for a table, but also generates stored procedure create scripts for all the above with the option of physically creating them in the database using SQL Server Management Objects for SQL Server 2005 ( see SQL Server Management Objects (SMO) - Create Stored Procedures in C# - Code Generation ).
I haven't downloaded the source code for the article above, but if you are interested in code generation, you may want to download the source code for the article to get a better understanding of how you can use SQL Server MetaData to help you generate business classes, queries, and stored procedure with little effort based on table, column, and index information in each database.
Source: David Hayden ( ASP.NET Developer )
ADO.NET 2.0 Tutorials