Passing c# DataTable as a parameter to stored procedure in MS SQL Server 2008 [closed]
I want to pass a DataDable to a stored procedure as parameter cointaning the columns below: Supp_Id int Del_Methode_Id int Ord_Ammount int Promo_Id int Discount_Ammount Money Now I want to use this datatable in stored procedure and want to declare a cursor on it. And use that cursor to insert values into the database table sequentially. Please tell me how to declare datatable parameter in stored procedure and then using cursor on that parameter ? First you need to create a type: CREATE TYPE dbo.whatever AS TABLE ( Supp_Id int, Del_Methode_Id int, Ord_Amount int, Promo_Id int, Discount_Amount