从数据库中获取数据

问题描述:

我有一个名为状态表的表,该表具有用户ID名称和状态字段.当一个人登录其用户ID和名称时,它将存储在数据库中,并且状态表从0更新为1,然后又有一个用户来登录并更新表.

因此,现在我已经使用userid = 2002和name = abc登录,目前我正在使用该系统,当另一个人使用其userid = say 2003 name = efg登录时,由于2003处于联机状态或当前状态,userid 2002应该会收到弹出消息作为弹出消息登录到申请表中

实际上,这是一个基于窗口的应用程序

任何人都可以帮忙吗?

I have one table called status table having userid name and status field .when one person logged in his user id and name will be stored in database and the status table is updated from 0 to 1.Then one more user will come and logged in and table updated.

So now i have logged in with say userid=2002 and name=abc i am using the system at present ,when another person logged in with his userid=say 2003 name=efg then userid 2002 should receive popup message as 2003 is online or currently logged in the application form as popup message

Actually this is a window based application

Can anyone please help this

首先,如果我不断收到一条弹出消息,说新用户已登录该应用程序,我会感到非常恼火.我建议使用一种不那么侵入性的通知机制.

对于您的问题,我只需要让应用程序检查数据库即可确定谁登录了.使其每10分钟左右自动进行一次检查.还为用户提供一种手动检查的方法(菜单项或按钮).
First, I would be really annoyed if I kept getting a popup message saying a new user has logged into the application. I would recommend a less intrusive notification mechanism.

As to your problem, I would simply make the application check the dabase to se who''s logged in. Make it check automatically every 10 minutes or so. Also provide the user with a way to manually check (a menu item or button).


朋友,

首先请指定您的应用程序是纯桌面还是带有桌面的Web?

谢谢,

Mahesh Patel
hi friend,

First of all please specify that your application is pure desktop or web with desktop?

Thanks,

Mahesh Patel