如何将数据从datagridview插入到不同的表中 [英] How to insert data from datagridview in to diferrent tables
本文介绍了如何将数据从datagridview插入到不同的表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个表学生,其中studentId作为主键,并使用studentId作为外键进行测试,我已将表学生数据加载到datagridview,我想将测试结果记录到datagrid然后插入测试表
我尝试了什么:
我不知道如何获得主键
I have two one table students with studentId as primary key and test with studentId as foreign key,I have loaded table student data in to datagridview and i want to record test result into datagrid and then insert into test table
What I have tried:
I have no idea how to get that primary key
推荐答案
这似乎就是你要找的东西:来自单个DataGridView中两个表的数据 [ ^ ]
This seems to be what you are looking for: Data from Two Tables in a Single DataGridView[^]
这篇关于如何将数据从datagridview插入到不同的表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文