c# - Merge DataRow to SQL Server database table -


in sql server 2008 r2 database, have existing table [dbo].[abc].[mytable]. want read rows datagridview , merge them mytable.

suppose use stored procedure.

i have no idea looping through , merging rows.

thanks help.

private void saverecords(datagridview dgv) {         foreach (datagridviewrow row in dgv.rows)         {             datarow myrow = (row.databounditem datarowview).row;             // merge table in database.         } } 

you should use command builder, take @ this sqlcommandbuilder example .


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -