如何更新VS2013的父子关系? [英] How can I UPDATE parent / child relation VS2013 ?

查看:71
本文介绍了如何更新VS2013的父子关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<表> <身体>

我想问问是否有人可以帮助我了解如何更新我的孩子关系.我有一个客户"表格,然后是帐户"表和帐户是孩子.我可以成功地将信息保存到 客户表:

I would like to ask if someone could please help me to understand how to update the child relation that I have. I have a "customers" table and then "accounts" table and the accounts is the child. I can successfully save information to the customers table:

me.validate()       
me.CustomersBindingSource.Endedit()   
me.CustomersAccountsBindingSource.Endedit()    "child"    
me.TableAdapterManager1.UpdateAll(me.Shopdataset)

运行程序时,在datagridviews上显示信息没有问题.关闭程序,然后重新启动程序后,可以看到我的客户数据在那里,但是所有客户的帐户数据都丢失了.

I don't have an issue displaying the information on my datagridviews when I am running the program. After I have closed the program and then restarted the program, I can see that I customers data is there but all the customer's account data is missing.

先谢谢您.

推荐答案

乔·杜兰,

感谢您在MSDN论坛中发帖.

Thank you for posting in MSDN forum.

根据您的描述和代码段,我无法找到相关的解决方案.似乎您正在尝试将数据填充到DGV中.如果是从数据库中读取数据,则可能是由于数据库连接引起的错误,请检查您的 数据库连接字符串.

Based on your description and code snippet, I am unable to find out relevant solutions. It seems that you are trying to fill the data into DGV. If the data is read from the database, perhaps the error comes from database connection, please check your database connection string.

如果问题仍然存在,则可以发布一些有关在DataGridView中填充数据的代码,并通过调试来发布一些错误消息.

If the issue still exist, you could post some code about populating data in DataGridView and some error message by debugging it.

最好的问候,

Neda Zhang

Neda Zhang


这篇关于如何更新VS2013的父子关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆