Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used dataview.
i have select 5 records and stored in dataview dv.
now this records i have to store in database table.
how can i do this?

my code is..
objdal.MaxNo = 2;
objdal.CourseId = Convert.ToInt16(ddlCourseName.SelectedValue);
dv = objdal.SelectQuestions(); // randomly selected 5 data comes in dv.
Posted

1 solution

You can use table value parameter for the same.
If you are using SQL server 2008 then Table value parameter is the best thing for the same.
Below are some link which is help you.

C# and Table Value Parameters[^]

Table Value Parameter in SQL Server 2008[^]

http://blog.sqlauthority.com/2008/08/31/sql-server-table-valued-parameters-in-sql-server-2008/[^]

Hopefully Its Help you.
:)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900