积极答复者
填充数据集

问题
-
填充数据集,例如:
adapterGrade.Fill(ds,"Grade"); 请问“Grade”指的是数据集中的表格名称吧?它必须和数据库表中的年纪表名称一模一样吗?还是可以随便定义此表格名称?谢谢!
- 已移动 Sheng Jiang 蒋晟Moderator 2012年5月8日 22:40 (发件人:.NET Framework 一般性问题讨论区)
答案
-
不需要,你可以指定一个数据库中不存在的表名。不过代码生成器不会生成访问这个表的代码,要访问的话还需要自己写代码。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已编辑 Sheng Jiang 蒋晟Moderator 2012年5月8日 22:46
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29
-
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29
-
Grade 是值内存中使用的名称,不一定要和数据库表对应
可以随便定义
爱吃西瓜的小强[mcpd]
- 已建议为答案 Kangqiang Hua 2012年5月10日 7:44
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29
全部回复
-
例如:adapter.Fill(ds,"Grade"); “Grade”表面就是指数据库中的相关表明,还是可以随便定义?谢谢
- 已合并 Sheng Jiang 蒋晟Moderator 2012年5月8日 22:43
-
不需要,你可以指定一个数据库中不存在的表名。不过代码生成器不会生成访问这个表的代码,要访问的话还需要自己写代码。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已编辑 Sheng Jiang 蒋晟Moderator 2012年5月8日 22:46
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29
-
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29
-
Grade 是值内存中使用的名称,不一定要和数据库表对应
可以随便定义
爱吃西瓜的小强[mcpd]
- 已建议为答案 Kangqiang Hua 2012年5月10日 7:44
- 已标记为答案 Allen_MSDNModerator 2012年5月14日 2:29