基于midas的MIS中的用户操作日志的创建(待续)
2006-08-20 02:33
183 查看
http://groups.google.com/group/borland.public.midas/browse_thread/thread/62869146faacfc96/c75cd6a1c77bd295?lnk=st&q=midas+identify+client&rnum=6#c75cd6a1c77bd295
All 5 messages in topic - view as tree
From: Andreas Oberhofer - view profile
Date: Fri, Nov 24 2000 12:00 am
Not yet rated
show options
Hello,
when processing the BeforeApplyUpdates event on the server in a few cases I
need some additional data from the client (in my case a file).
How do I call the client and ask him to send me the data ?
Or: how do I start a communication between server and client from the server
side ?
I am using TSocketConnections, ciMultiInstance, tmApartment.
Thank you
Andreas Oberhofer
Reply Rate this post:
From: Dan Miser /(TeamB/) - view profile
Date: Sat, Nov 25 2000 12:00 am
Not yet rated
show options
Take a look at my Callback(2) sample on the MIDAS page of my web site.
--
Dan Miser
http://www.distribucon.com
"Andreas Oberhofer" <Andreas.Oberho...@tin.it> wrote in message
news:3a1e6228$1_1@dnews...
- Show quoted text -
Reply Rate this post:
From: Andreas Oberhofer - view profile
Date: Mon, Nov 27 2000 12:00 am
Not yet rated
show options
Thank you Dan,
I have already seen this example.
It installs an additional (communication-) server at the client side.
Do I have to install also the ScktSrv.exe on the client ?
Is there no easier way to have the same result, like calling a method of the
TClientDataset or the TSocketConnection ?
If not I think it would be easier to pack some status information into the
AfterApplyUpdates event. My problem is that I would like to call the client
immediatly when processing every single record in the BeforeUpdateRecord
event. When I use AfterApplyUpdates I have to identify the single records I
want to talk about.
It seems that it is not possible with standard Midas methods to communicate
on a record per record level.
Thank you
Andreas
Reply Rate this post:
From: Alexandre GUILLIEN - view profile
Date: Mon, Nov 27 2000 12:00 am
Not yet rated
show options
> Thank you Dan,
> I have already seen this example.
> It installs an additional (communication-) server at the client side.
> Do I have to install also the ScktSrv.exe on the client ?
No.
> It seems that it is not possible with standard Midas methods to communicate
> on a record per record level.
It is not.
The callback solution is the best and only available. You just have, from the
server, to call methods of the callback object you created client-side to have
direct communication with the client. The requirements are to use
TSocketConnection client side and use the structure given in the callback
example. Nothing more.
Alexandre Guillien
Reply Rate this post:
From: Sunil Furtado - view profile
Date: Thurs, Nov 30 2000 12:00 am
Not yet rated
show options
> If not I think it would be easier to pack some status information into the
> AfterApplyUpdates event. My problem is that I would like to call the
client
> immediatly when processing every single record in the BeforeUpdateRecord
> event. When I use AfterApplyUpdates I have to identify the single records
I
> want to talk about.
I store some state information in my client and pass this information as
parameters to the server on apply updates (Thanks to Dan).
Client side:
if dm.paymast.ChangeCount > 0 then
begin
dm.paymast.setoptionalparam('UserLevel', dm.level, True); // thise are
the optional parameters
dm.paymast.setoptionalparam('location', dm.location, True);
if dm.paymast.applyupdates(0) = 0 then
dm.paymast.refresh;
end
else
messagedlg('No changes to save !!!',mtinformation,[mbok],0);
On the server:
beforeupdaterecored event:
var
UserLevel,location: string;
begin
// get the parameters from the client
UserLevel := DeltaDS.GetOptionalParam('UserLevel');
location := DeltaDS.GetOptionalParam('location');
// check for access permissions
if (UpdateKind = ukModify) then
begin
if ((UserLevel <> 'A') and (location <> 'C')) then
raise exception.create('You dont have enough rights to modify data');
end;
end;
A bit extreme to send info to the server and then raise the error but it
works.
--
Sunil Furtado
New Mangalore Port Trust
Reply Rate this post:
All 5 messages in topic - view as tree
From: Andreas Oberhofer - view profile
Date: Fri, Nov 24 2000 12:00 am
Not yet rated
show options
Hello,
when processing the BeforeApplyUpdates event on the server in a few cases I
need some additional data from the client (in my case a file).
How do I call the client and ask him to send me the data ?
Or: how do I start a communication between server and client from the server
side ?
I am using TSocketConnections, ciMultiInstance, tmApartment.
Thank you
Andreas Oberhofer
Reply Rate this post:
From: Dan Miser /(TeamB/) - view profile
Date: Sat, Nov 25 2000 12:00 am
Not yet rated
show options
Take a look at my Callback(2) sample on the MIDAS page of my web site.
--
Dan Miser
http://www.distribucon.com
"Andreas Oberhofer" <Andreas.Oberho...@tin.it> wrote in message
news:3a1e6228$1_1@dnews...
- Show quoted text -
Reply Rate this post:
From: Andreas Oberhofer - view profile
Date: Mon, Nov 27 2000 12:00 am
Not yet rated
show options
Thank you Dan,
I have already seen this example.
It installs an additional (communication-) server at the client side.
Do I have to install also the ScktSrv.exe on the client ?
Is there no easier way to have the same result, like calling a method of the
TClientDataset or the TSocketConnection ?
If not I think it would be easier to pack some status information into the
AfterApplyUpdates event. My problem is that I would like to call the client
immediatly when processing every single record in the BeforeUpdateRecord
event. When I use AfterApplyUpdates I have to identify the single records I
want to talk about.
It seems that it is not possible with standard Midas methods to communicate
on a record per record level.
Thank you
Andreas
Reply Rate this post:
From: Alexandre GUILLIEN - view profile
Date: Mon, Nov 27 2000 12:00 am
Not yet rated
show options
> Thank you Dan,
> I have already seen this example.
> It installs an additional (communication-) server at the client side.
> Do I have to install also the ScktSrv.exe on the client ?
No.
> It seems that it is not possible with standard Midas methods to communicate
> on a record per record level.
It is not.
The callback solution is the best and only available. You just have, from the
server, to call methods of the callback object you created client-side to have
direct communication with the client. The requirements are to use
TSocketConnection client side and use the structure given in the callback
example. Nothing more.
Alexandre Guillien
Reply Rate this post:
From: Sunil Furtado - view profile
Date: Thurs, Nov 30 2000 12:00 am
Not yet rated
show options
> If not I think it would be easier to pack some status information into the
> AfterApplyUpdates event. My problem is that I would like to call the
client
> immediatly when processing every single record in the BeforeUpdateRecord
> event. When I use AfterApplyUpdates I have to identify the single records
I
> want to talk about.
I store some state information in my client and pass this information as
parameters to the server on apply updates (Thanks to Dan).
Client side:
if dm.paymast.ChangeCount > 0 then
begin
dm.paymast.setoptionalparam('UserLevel', dm.level, True); // thise are
the optional parameters
dm.paymast.setoptionalparam('location', dm.location, True);
if dm.paymast.applyupdates(0) = 0 then
dm.paymast.refresh;
end
else
messagedlg('No changes to save !!!',mtinformation,[mbok],0);
On the server:
beforeupdaterecored event:
var
UserLevel,location: string;
begin
// get the parameters from the client
UserLevel := DeltaDS.GetOptionalParam('UserLevel');
location := DeltaDS.GetOptionalParam('location');
// check for access permissions
if (UpdateKind = ukModify) then
begin
if ((UserLevel <> 'A') and (location <> 'C')) then
raise exception.create('You dont have enough rights to modify data');
end;
end;
A bit extreme to send info to the server and then raise the error but it
works.
--
Sunil Furtado
New Mangalore Port Trust
Reply Rate this post:
相关文章推荐
- 基于aop的用户操作日志
- 基于NopCommerce的开发框架——缓存、网站设置、系统日志、用户操作日志
- STS创建Spring Boot项目实战(Rest接口、数据库、用户认证、分布式Token JWT、Redis操作、日志和统一异常处理)
- STS创建Spring Boot项目实战(Rest接口、数据库、用户认证、分布式Token JWT、Redis操作、日志和统一异常处理)
- 基于注解的aop实现用户操作日志管理
- shell编程 批量创建用户(不需要文件操作)
- pb中创建数据操作日志字典[收藏]
- 基于日志挖掘的误操作不完全恢复思路
- oracle 创建表空间、用户、授权的详细操作sql语句
- Oracle Database的基本操作——创建表空间,用户,授权。。。
- Oracle创建表空间、用户的操作步骤
- Oracle创建用户,表空间,以及在对应的表空间下创建对应的表操作
- 基于吉日嘎底层架构的Web端权限管理操作演示-日志管理
- RBAC权限管理与用户操作日志
- 通过登陆IP记录Linux所有用户登录所操作日志的方法
- 在Linux下记录所有用户的登录和操作日志(脚本)
- java spring 记录用户增删改操作日志
- oracle创建删除用户命令和部分表空间操作
- hadoop 创建用户及hdfs权限,hdfs操作等常用shell命令
- sudo配合syslog日志审计记录用户操作