VB.NET多用户应用程序在INSERT,UPDATE到数据库之后刷新数据源 [英] VB.NET multiuser application refresh datasource after INSERT, UPDATE to database

查看:213
本文介绍了VB.NET多用户应用程序在INSERT,UPDATE到数据库之后刷新数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我对多用户应用程序有疑问并刷新datagridview等数据源。

当用户创建数据表中的新记录(或修改,删除一个)我认为最好的方法是在更新数据库后获取所有tabledata(数据库)。

那么你可以肯定你将当前数据放在本地数据表中。

每次更改(插入,更新,删除)都会立即更新到数据库中。



现在每次更改后我都会做一个简单的SELECT * FROM ..来获取所有内容。

数据gridview闪烁,我觉得不是很整洁



因此,我的问题是:这是正确的方式还是错了?

我用Google搜索了几个小时,但我无法离开。



有没有人可以帮我这个,那个非常感谢。

抱歉我的英文不好,我是荷兰人:)



大喊大叫已删除[/编辑]

Hi everyone,

I have a question about multiuser applications and refreshing the datasource of datagridview etc.
When an user creates a new record in a datatable (or modifies, delete one) i think the best way is to get all the tabledata (of the database) after the update to the database.
Then you can be sure that u have the current data in your local datatable.
Every change (insert,update,delete) is immediately updated into the database.

Now after every change i do a simple "SELECT * FROM .." to get everything.
The data gridview flicker, which I find not very tidy

My question is therefore: is this the right way or is this wrong?
I''ve googled for hours, but I can not get out.

Is there anyone who can help me with this, that would be very very appreciated.
sorry for my bad English, I''m a Dutchman :)

Shouting removed[/Edit]

推荐答案

每次改变后我做一个SELECT * FROM ..,似乎没有别的办法

多亏了每个花时间阅读我的问题的人
after every change i do a SELECT * FROM .., it seems there''s no other way
thanks to everyone who took the time to read my question


这篇关于VB.NET多用户应用程序在INSERT,UPDATE到数据库之后刷新数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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