Options

HYC00 - error when killing Session

ASK_ITGASK_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.
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

Answers

  • Options
    ASK_ITGASK_ITG Member Posts: 30
    Hi.

    Solved it myself - inserted a COMMIT after the DELETE.
    /Allan
  • Options
    ayhan06ayhan06 Member Posts: 210
    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;
    
  • Options
    Fariraishe_ShumbaFariraishe_Shumba Member Posts: 44
    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 Shumba
  • Options
    Fariraishe_ShumbaFariraishe_Shumba Member Posts: 44
    Thank you Guys I just inserted a COMMIT after the DELETE as you said, it worked perfectly well.

    Regards

    Fari
Sign In or Register to comment.