HYC00 - error when killing Session

ASK_ITG
Member Posts: 30
Hi.
I am trying to make a report that delete a record in the Session (virtual) table - when certain critiria are met.
When executing this report and a session is found to be deleted - I get the following error:
Following ODBC-error occurred:
Error: [Microsoft][ODBC SQL Server Driver]Optional featura not implemented
State-id: HYC00
Anyone who can help?
I am trying to make a report that delete a record in the Session (virtual) table - when certain critiria are met.
Session - OnPreDataItem() Session.SETRANGE("Application Name",SessionKillerSetup."Application Name"); Session.SETFILTER("Database Name",SessionKillerSetup."Database Filter"); Session.SETRANGE("My Session",FALSE); Session - OnAfterGetRecord() IF ("Idle Time" > SessionKillerSetup."Inactive Period") THEN BEGIN DELETE; END;
When executing this report and a session is found to be deleted - I get the following error:
Following ODBC-error occurred:
Error: [Microsoft][ODBC SQL Server Driver]Optional featura not implemented
State-id: HYC00
Anyone who can help?
/Allan
0
Answers
-
Hi.
Solved it myself - inserted a COMMIT after the DELETE./Allan0 -
ASK_ITG wrote:Hi.
Solved it myself - inserted a COMMIT after the DELETE.
after deleting records, this error occurs when NAV try to reach next record. this is the problem of NAV 5.01 (buidl 27191). but it was working in 4.03 (25638) perfect.
to avoid this:UserSetup.SETFILTER("Idle Time To Disconnect",'>%1',0); IF UserSetup.FIND('-') THEN REPEAT Session.SETFILTER("User ID",'*'+UserSetup."User ID"); IF Session.FIND('-') THEN REPEAT IF Session."Idle Time" >= UserSetup."Idle Time To Disconnect" THEN BEGIN TempInteger.Number := Session."Connection ID"; IF TempInteger.INSERT THEN; END; UNTIL Session.NEXT = 0; UNTIL UserSetup.NEXT = 0; Session.RESET; TempInteger.RESET; IF TempInteger.FIND('-') THEN REPEAT IF Session.GET(TempInteger.Number) THEN Session.DELETE; UNTIL TempInteger.NEXT = 0;
0 -
Hi can you post the whole code you have used for this session killing to fshumba@hotmail.com, I have been looking for session killing code
Regards
F Shumba0 -
Thank you Guys I just inserted a COMMIT after the DELETE as you said, it worked perfectly well.
Regards
Fari0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions