I am in the process of revising code to use TVP to send data from our VB.NET app to the SQL 2008 DB and try to keep all the writes atomic.
Using this page as a general guide: http://www.sqlteam.com/article/sql-server-2008-table-valued-parameters
I am in the process of creating all the in-code datatables to be sent to the SQL stored procedure
However, I will have to create these datatables and datacolumns (then add the columns to the tables) repeatedly for multiple tables. In my case, each of these Datatables will have layouts identical to the SQL Server table (with the exception on the autonumber PK and GUID)....
Is there a way to auto-generate this datatable creation code? Or is there a faster way in general?
Thanks