开发者

how to add multiple row from DataGridView to a table in the DataBase?

in my DataGr开发者_如何学PythonidView there are about 2 or 3 rows about the Supplier data it is about Supplier data ,,as there might be one product i get from 2 or 3 suppliers how to add the Suppliers_ID (FK) to the Product table in the data base from the data grid view when i click on a button (Confirm adding) and to avoid the data redundancy i think it might be saving the 2 or 3 Suppliers_ID as Records but i donknow how to do this ?


You need to create a master-detail relationship between your two tables. This below link is for DataGrid but you can use the same logic for DataGridView:

http://msdn.microsoft.com/en-us/library/59y45529(vs.100).aspx

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜