Click here to Skip to main content
16,004,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello sir/mam i want to help from you.i am working in asp.net c# and sql server. Suppose I have 3 columns in database and i want to insert multiple row in database on click. If i have 5 textbox mean 5 row will be insert.
Please help i will wait your answer
Posted
Updated 4-Sep-15 22:06pm
v2

1 solution

If I understand the question correctly, you would Prepare[^] the statement and define the SqlParameters[^]. Then for each text box you would set the value for the parameter and Execute[^] the query.

So the basic idea is similar to a loop. For an example, have a look at Version 4, use prepare for repeated statements[^]
 
Share this answer
 
Comments
Arasappan 5-Sep-15 5:39am    
5 ed
Wendelius 6-Sep-15 0:20am    
Thank you.

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