Killing a session(Raj Patel BCA)

Vineeth.RVineeth.R Member Posts: 121
Hai Raj Patel BCA

I saw the killing session coding in the link u sent but i didnt understand something..I saw a variable Timer of type Automation was declared but what SUBTYPE(Automation server list) was used for creating a Timer variable??? please advise..

rajpatelbca wrote:
you can download this and look into the code it might be help you.

http://www.mibuso.com/forum/viewtopic.p ... in+session

Kill Idle Navision Sessions (SQL scripts)
http://www.mibuso.com/dlinfo.asp?FileID=367
Session Killer
http://www.mibuso.com/dlinfo.asp?FileID=71

just you have to filter those records form session and delete then session will be automatically terminated.

if you want to terminate session automatically then create procession only report and add it in job queue.


Regards,
Thanks and Regards
Vineeth.R

Comments

  • rajpatelbcarajpatelbca Member Posts: 178
    hi Vineeth,

    if your are talking about first link in which ara3n has written some code then here is its explanation.

    1, he has created a variable type of automation and its sub type is 'CP timer ' if you haven't registered cptimer.dll which is available in Client folder you will not find it in automation control list. but u can take 'Navision Timer 1.0'.Timer. set interval by using property of an object. eg. timer.Interval(6000);

    if you want to register cptimer.dll then go to tat folder where it is place then use this command in command line Regsvr32 cptimer.

    2, as you can see in code there is a single instance codeunit having variable timer. this variable's withevents property has set to yes. so, you will have to trigger of timer. one event named TimerEvent
    has a code to kill the session.

    hope it is clear.
    Regards,
    Experience Makes Man Perfect....
    Rajesh Patel
  • Vineeth.RVineeth.R Member Posts: 121
    hi raj patel,

    let me try the way u explained and wil catch up with u if any doubts...

    vineeth
    Thanks and Regards
    Vineeth.R
  • rajpatelbcarajpatelbca Member Posts: 178
    ok sure.
    Experience Makes Man Perfect....
    Rajesh Patel
  • Vineeth.RVineeth.R Member Posts: 121
    hai Raj Patel,

    I was able to install the cptimer.dll and i created the variable timer but now my doubt is regarding the 2 record variables declared like

    Session@1000000000 : Record 2000000009;
    Db@1000000001 : Record 2000000048

    what are the contents of these tables? i have to create these tables in my database right? please advise me what wil be fields,and what data's to enter..i am using Chronus database for testing this.


    ok sure.
    Thanks and Regards
    Vineeth.R
  • rajpatelbcarajpatelbca Member Posts: 178
    hi Vineeth.R,

    There is no need to create Session Table. this is a virtual table. you can see this content of that table in File -> Database ->Information->session ->Current session. you will see there session table content. by the way you can create tabular form with table session by using wizard.


    and Database is also virtual table you can check out by creating a tabular form by wizard.

    Regards,
    Experience Makes Man Perfect....
    Rajesh Patel
  • Vineeth.RVineeth.R Member Posts: 121
    Hai Raj Patel,

    Thank you for the reply. I wil try again and let you know the status.

    Regards
    Vineeth
    hi Vineeth.R,

    There is no need to create Session Table. this is a virtual table. you can see this content of that table in File -> Database ->Information->session ->Current session. you will see there session table content. by the way you can create tabular form with table session by using wizard.


    and Database is also virtual table you can check out by creating a tabular form by wizard.

    Regards,
    Thanks and Regards
    Vineeth.R
Sign In or Register to comment.