如何从VB.NET中的DataGridView将数据添加到SQL Server 2005 [英] How can i add data to SQL server 2005 from DataGridView in VB.NET
问题描述
大家好,
我有一个Excel文件可以存储有关我的员工的信息.我想将所有员工信息添加到我的数据库中.为此,我这样做是:
1.我导入了所有员工信息以在DataGridView上显示
2.在datagridview中导入后,我可以添加更多员工
3.我想将DataGridView上的所有信息保存到我的数据库中.
对于步骤1,2,可以.将Excel中的所有数据加载到datagridview,我可以添加更多内容
对于步骤3,我不知道该怎么办.
有人指导我如何将数据从gridview保存到数据库吗?
谢谢
TONY
Hi all,
I have an excel file to store about my employee. i want to add all employee information to my Database.To do this, i did as:
1.I imported all employee information to display on DataGridView
2.I can add more employee after i imported in datagridview
3.I want to save all information on DataGridView to my Database.
For Step 1,2 are ok. all data from excel loaded to datagridview and i can add more
For step 3 i don''t know how can i do.
Does anybody guide me how to save data from gridview to database?
Thanks
TONY
推荐答案
我为此做了出色的教程,请在此处下载.
http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7492&lngWId=10
I doing excellent tutorial for this,download here.
http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7492&lngWId=10
这篇关于如何从VB.NET中的DataGridView将数据添加到SQL Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!