插入行数据表Visual Studio [英] insert line datatable visual studio

查看:141
本文介绍了插入行数据表Visual Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,

我在特定位置的数据表中插入一行.之后,我将更新数据库.我的问题是,当我更新数据库时,添加的行位于列表的底部.有人知道为什么吗?

x.Rows.InsertAt(maligne,i)
histTableAdapter.Update(x)

谢谢您.

Good day,

I insert a line in a datatable at a specific position. After that I update my database. My probleme is that when I update my database the line that I add go at the bottom of the list. Does some one know why.

x.Rows.InsertAt(maligne, i)
histTableAdapter.Update(x)

Thank you

推荐答案

我不确定这是VBA,我认为不是.无论哪种方式,您的问题都是您不了解数据库的工作方式.任何插入的记录将始终插入底部.最好的办法是创建一个带有位置索引的列,并以此进行排序.
I am nost sure that this is VBA, I don''t think so. Either way, your problem is that you don''t understand how databases work. Any records inserted will always be inserted at the bottom. The best you can do is create a column with a position index and sort by that.


这篇关于插入行数据表Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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