I created a user-defined table type in SQL Express 2008 and a StoredProc that will receive the data type from a .net application. The table the SP will receive will contains rows that need to be updated, inserted or, if missing, deleted from the SQL table it refers. So, I need to iterate through the table parameter to know if I have to update, insert or delete the rows in the table. So, how can I do that? with a cursor?
To give you a better understanding, the .net application retrieves an image of the SQL table, put it in a datatable, manipulate the data and send them back to SQL. So, rows can be updated, inserted or deleted.
thanks for your help!