mibuso.com

Microsoft Business Solutions online community
It is currently Sat Aug 02, 2014 2:22 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: How to control/kill sessions?
PostPosted: Tue Feb 26, 2008 12:59 pm 
Offline
Site Admin

Joined: Sun Nov 07, 1999 8:01 am
Posts: 2044
Location: Wilrijk, Belgium
Country: Belgium (be)
How to control/kill sessions?

http://www.mibuso.com/howtoinfo.asp?FileID=18

Discuss this How To here.


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Wed Mar 04, 2009 3:23 pm 
Offline

Joined: Wed Mar 04, 2009 3:06 pm
Posts: 0
I have some trouble using this.

I've installed de NAS and the code, forms and tables. But it remains unusable:

The definition of the field User ID was changed after the object was saved

Old type: Text
New type: Code

Any idea?


Best regards(I've searched over and no answer at all)


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Thu Mar 05, 2009 10:40 am 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7684
Location: Milan
Country: Italy (it)
Did you try to recompile the objects?

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2014 - 20 & 21 November 2014 ««« Visit the conference website: http://www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Thu Mar 05, 2009 1:08 pm 
Offline

Joined: Wed Mar 04, 2009 3:06 pm
Posts: 0
I've tried to recompile.

But no luck...Usding Native NAV(NOT SQL) i think the method FINDFIRST is not possible.



I'm using nav 4.0 sp1.

Any idea ?


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Thu Mar 05, 2009 7:39 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7684
Location: Milan
Country: Italy (it)
I imported the objects on a 4.0SP1 native.
First I had the same error as you. Then I recompiled and I got no more errors.

2 things come in mind to test:
1) maybe the codeunit was in memory and after compiling it remained there. If you re-open the client it should take the new version of the codeunit and the problem should be solved.
2) If you have a problem with FINDFIRST, it means you have a client before 4.0SP1. FINDFIRST was introduced with 4.00SP1.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2014 - 20 & 21 November 2014 ««« Visit the conference website: http://www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Fri Mar 27, 2009 3:58 pm 
Offline

Joined: Wed Mar 04, 2009 3:06 pm
Posts: 0
You're right.

We are planning to change the NAV partner, ours is %&%&**

I'm learning to control, program and debug my system.

I have a SUPER rol but i can't run some codeunits design some forms...
Any idea? its the license? I cant design even having all access to tables, forms codeunits and so on?


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Fri Mar 27, 2009 4:03 pm 
Offline

Joined: Wed Mar 04, 2009 3:06 pm
Posts: 0
Ok right i think our license doesnt have design granule
So i can work on a local copy of the db.

I hace setup up all the fobs on the dev nav and exported and imported on the porduction db.

Tha NAS starts but the user need some perms that i cannot find.

I have created arole sessionkiller with acces to te session table and all the objects in the fobs(tables, forms, and codeunit)

But i still missing something


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Tue Mar 31, 2009 5:22 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7684
Location: Milan
Country: Italy (it)
If you run the codeunit from your client, does it work then?
If it works, than probably you still need to put the call to this codeunit in codeunit 1.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2014 - 20 & 21 November 2014 ««« Visit the conference website: http://www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Mon Jul 20, 2009 12:02 pm 
Offline

Joined: Wed Feb 25, 2009 10:46 am
Posts: 22
Does this solution works for Native Navision DB also? I tried to do this ...everything works ..but session is not killed.

If this does not apply to native databases..do we have any other solution.


Thanks in advance

Vijay


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Mon Jul 20, 2009 1:41 pm 
Offline

Joined: Mon Mar 08, 2004 2:42 pm
Posts: 3255
Location: Hannover
Country: Germany (de)
yes you can kill the session also in the native database (>= 4.00)
For test: Open Database -> File -> Database -> Information -> Sessions -> active Sessions -> DrillDown -> SessionList -> F4 to kill a session

_________________
Do you make it right, it works too!


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Tue Jul 21, 2009 8:30 am 
Offline

Joined: Wed Feb 25, 2009 10:46 am
Posts: 22
Thanks for the reply...but my query is regarding the auto session killing through code which we are talking in the posts above.

Will this code work with Native DB as well?


Thanks
Vijay


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Tue Jul 21, 2009 12:08 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2014 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7684
Location: Milan
Country: Italy (it)
vijay4398 wrote:
Thanks for the reply...but my query is regarding the auto session killing through code which we are talking in the posts above.

Will this code work with Native DB as well?


Thanks
Vijay

Yes.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting

»»» Mark your calendar: NAV TechDays 2014 - 20 & 21 November 2014 ««« Visit the conference website: http://www.navtechdays.com


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Sun Dec 13, 2009 1:12 pm 
Offline

Joined: Tue May 06, 2008 2:56 pm
Posts: 371
Location: Walton-On-Thames
Country: United Kingdom (uk)
rolflin wrote:
The definition of the field User ID was changed after the object was saved

Old type: Text
New type: Code


This is a common error. It's caused because the type of the "User ID" on the virtual table is different between Native and SQL. You have to SAVE the object (normally a form) again, not just recompile from the object designer.

Second minor point, for the F4 kill to work on SQL the user must be a member of the SQL system administrator role with delete permission on the Navision session table. Just being a member of the Navision SUPER group is not enough.

_________________
Robert de Bath
TVision Technology Ltd


Top
 Profile  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Thu Apr 15, 2010 12:54 pm 
Offline

Joined: Thu Apr 15, 2010 12:45 pm
Posts: 0
Country: France (fr)
Great job ! Unfortunatelly I'm unable to launch CU because of a error "you can use FINDSET only if keys are acending ordered" (table session).

IF PtmpSession.SETCURRENTKEY("Idle Time") THEN BEGIN
// I am on SQL. SQL has a key on "Idle Time".
PtmpSession.ASCENDING(FALSE);
IF PtmpSession.FINDSET THEN <---- ERROR here

I'm using Nav 4.03 with SQL Server 2005. I'm able to sort on idle time in session form so i think the key is present. So ?

Tco


Top
 Profile E-mail  
 
 Post subject: Re: How to control/kill sessions?
PostPosted: Thu Apr 15, 2010 1:25 pm 
Offline

Joined: Mon Mar 08, 2004 2:42 pm
Posts: 3255
Location: Hannover
Country: Germany (de)
The findset command was a part of SP1. And is not designed for desc. Order (PtmpSession.ASCENDING(FALSE);)
So, change from findset to find('-').

regards

_________________
Do you make it right, it works too!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: