将XML数据导入sql表

将XML数据导入sql表

问题描述:

如何在运行时将datagridview数据存储到sql表中。(c#在窗口应用程序中)

注意:

表将在运行时自动创建。



先谢谢

How can i store datagridview data into sql table at run time.(c# in window application)
Note:
Table will be created automatically at run time in sql.

Thanks in Advance





查看以下文章。

将数据表发送到存储过程 [ ^ ]



因此,使用这个,你可以将gridview的数据源传递给strored过程,那就是创建表并将数据表中的行插入到sql表中。



希望它有所帮助。
Hi,

check the below article.
Sending a DataTable to a Stored Procedure[^]

So, using this, you can pass the datasource of the gridview to strored procedure and that would create the table and insert the rows from the datatable to sql table.

hope it helps.