How to kill a remote session?

DeepDeep Member Posts: 569
Hi all.

Is there any utility which can kill a remote session over NAV 4.0.
The DB used is native DB
Regards,

Deep
India

Comments

  • rajpatelbcarajpatelbca Member Posts: 178
    if you are talking about session killing then see this link.

    http://www.mibuso.com/forum/viewtopic.p ... ssion+kill
    Experience Makes Man Perfect....
    Rajesh Patel
  • DeepDeep Member Posts: 569
    This seems for SQL database.
    I need this for a native DB.
    Regards,

    Deep
    India
  • SavatageSavatage Member Posts: 7,142
    for native there are 3rd party options too

    you could use www.autocloseidle.com or www.expandit.com
  • krikikriki Member, Moderator Posts: 9,110
    This also works for native : http://www.mibuso.com/howtoinfo.asp?FileID=18
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DeepDeep Member Posts: 569
    Thanks a lot friends.
    Regards,

    Deep
    India
  • Vineeth.RVineeth.R Member Posts: 121
    hello raj,

    if i am using a local database can i kill my session???
    since i am trying this example in my laptop and not in a server where lots of people are using my databse i cant test it. can i test this in local databse?? i created the single instance codeunit but where from shoiuld i call this codeunit to run close sessions??
    pls advise as i m new to navision i have little knowledge only
    thanks in advance


    if you are talking about session killing then see this link.

    http://www.mibuso.com/forum/viewtopic.p ... ssion+kill
    Thanks and Regards
    Vineeth.R
  • krikikriki Member, Moderator Posts: 9,110
    You can open the same local DB multiple times if you use the same fin.exe.

    If you put code in the OnRun-trigger of the singleinstance codeunit to initiate the timer, you can just run the codeunit from the object designer.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear Kriki
    If I will create the Report (Processonly) by taking DataItem(Session) and give filter to Login type to(Windows) then will it work in SQL DB.
    Vikram Dabas
    Navision Technical Consultant
  • krikikriki Member, Moderator Posts: 9,110
    Dear Kriki
    If I will create the Report (Processonly) by taking DataItem(Session) and give filter to Login type to(Windows) then will it work in SQL DB.
    I am not sure I understand what you want to do. :oops:
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Vineeth.RVineeth.R Member Posts: 121
    hi kriki,

    i tried as u said using 2 fin.exe opened. but when i tried to run my codeunit one error message prompted saying "You cannot close a session when u r not connected to server" ??? what did it mean..how to solve this issue pls advise

    thanks Vineeth



    kriki wrote:
    You can open the same local DB multiple times if you use the same fin.exe.

    If you put code in the OnRun-trigger of the singleinstance codeunit to initiate the timer, you can just run the codeunit from the object designer.
    Thanks and Regards
    Vineeth.R
  • krikikriki Member, Moderator Posts: 9,110
    I never saw that error. :shock:
    Try to use the debugger to see if you find something more on the command that creates the error.
    Vineeth.R wrote:
    hi kriki,

    i tried as u said using 2 fin.exe opened. but when i tried to run my codeunit one error message prompted saying "You cannot close a session when u r not connected to server" ??? what did it mean..how to solve this issue pls advise

    thanks Vineeth



    kriki wrote:
    You can open the same local DB multiple times if you use the same fin.exe.

    If you put code in the OnRun-trigger of the singleinstance codeunit to initiate the timer, you can just run the codeunit from the object designer.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Vineeth.RVineeth.R Member Posts: 121
    Dear Kirki

    this is my single instance codeunit coding to kill a session



    OnRun()

    IF ISCLEAR(Timer) THEN
    CREATE(Timer);
    Timer.StartTimer(6000);
    Code;

    Code()

    Session.SETRANGE("My Session",FALSE);
    Session.SETFILTER("Idle Time",'>100 min');
    IF Session.FINDFIRST THEN REPEAT
    Session.DELETE;//Debugger stops here saying "you cannot delete a session when u r not connected to server
    COMMIT;
    UNTIL Session.NEXT = 0;



    how to solve it.. i tried it by opening two fin.exe and running this codeunit in one

    kriki wrote:
    I never saw that error. :shock:
    Try to use the debugger to see if you find something more on the command that creates the error.
    Vineeth.R wrote:
    hi kriki,

    i tried as u said using 2 fin.exe opened. but when i tried to run my codeunit one error message prompted saying "You cannot close a session when u r not connected to server" ??? what did it mean..how to solve this issue pls advise

    thanks Vineeth



    kriki wrote:
    You can open the same local DB multiple times if you use the same fin.exe.

    If you put code in the OnRun-trigger of the singleinstance codeunit to initiate the timer, you can just run the codeunit from the object designer.
    Thanks and Regards
    Vineeth.R
  • krikikriki Member, Moderator Posts: 9,110
    Try something like this:
    Session.RESET;
    Session.SETRANGE("My Session",FALSE);
    Session.SETFILTER("Idle Time",'>100 min');
    IF Session.FINDSET THEN
      REPEAT
        Session2 := Session;
        Session2.FIND('=');
        Session2.DELETE(TRUE);
      UNTIL Session.NEXT = 0;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • SavatageSavatage Member Posts: 7,142
    The code master strikes again! \:D/
  • krikikriki Member, Moderator Posts: 9,110
    Savatage wrote:
    The code master strikes again! \:D/
    Wait for episode V : The empire ... eh ... codemaster strikes back! :lol:
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.