Skip to main content
Sergio Perin
Participating Frequently
Apr 10, 2021 1:34 PM UTC

UniObjects for .NET

In the UniObjects for .NET Developer Guide version 3.171.3 the property LastServerError in UniObjects object is not present in the uodotnet.dll. The guide is wrong or the property is missing.

------------------------------
Sergio Perin
Engineer
Baseware Systems
------------------------------

    2 replies

    Nik Kesic
    Participating Frequently
    Apr 12, 2021 2:07 PM UTC
    In the UniObjects for .NET Developer Guide version 3.171.3 the property LastServerError in UniObjects object is not present in the uodotnet.dll. The guide is wrong or the property is missing.

    ------------------------------
    Sergio Perin
    Engineer
    Baseware Systems
    ------------------------------
    Hello Sergio

    Try this in your catch block 
    ...
    class Program
    {
         static void Main(string[] args)
         {
         UniSession us1 = null;
         try
           {
            UniSubroutine uSub = us1.CreateUniSubroutine("TIMESUB", 3);   // my subroutine has 2 properties
            ...
            }
    ...
         catch (Exception e)
         {
         if (us1 != null && us1.IsActive)
           {
           Console.WriteLine("Error ... " + e.Message);
           Console.WriteLine("Last Errors ... " + us1.LastServerError);
           UniObjects.CloseSession(us1);
           us1 = null;
           }
      }
    ...



    Error ... [Rocket U2][UODOTNET - UNICLIENT][ErrorCode=30106] Wrong number of arguments supplied to the subroutine
    Last Errors ... In /usr/udthome/demo/CTLG/TIMESUB at line 1 Error, SUBROUTINE 'TIMESUB' has different number of arguments than its CALL statement.



    ------------------------------
    Nik Kesic
    LKQ
    ------------------------------
    Sergio Perin
    Participating Frequently
    Apr 12, 2021 3:39 PM UTC
    Hello Sergio

    Try this in your catch block 
    ...
    class Program
    {
         static void Main(string[] args)
         {
         UniSession us1 = null;
         try
           {
            UniSubroutine uSub = us1.CreateUniSubroutine("TIMESUB", 3);   // my subroutine has 2 properties
            ...
            }
    ...
         catch (Exception e)
         {
         if (us1 != null && us1.IsActive)
           {
           Console.WriteLine("Error ... " + e.Message);
           Console.WriteLine("Last Errors ... " + us1.LastServerError);
           UniObjects.CloseSession(us1);
           us1 = null;
           }
      }
    ...



    Error ... [Rocket U2][UODOTNET - UNICLIENT][ErrorCode=30106] Wrong number of arguments supplied to the subroutine
    Last Errors ... In /usr/udthome/demo/CTLG/TIMESUB at line 1 Error, SUBROUTINE 'TIMESUB' has different number of arguments than its CALL statement.



    ------------------------------
    Nik Kesic
    LKQ
    ------------------------------
    Hi Nix,
    Thank you for your answer. The property LastServer Error is listed as belonging to UniObjects object, must be in UniSession object.
    Regards.

    El lun, 12 abr 2021 a las 15:07, Nik Kesic via Rocket Forum (<Mail@forum.rocketsoftware.com>) escribió:
    Hello Sergio Try this in your catch block  ... class Program {      static void Main(string[] args)      {      UniSession us1 = null;      try  ...
    Be sure to join the forums you're interested in to be notified of new content. Click the join button from either the forum listing page or the home page of any given sub-forum.

    Tip: Want a single update on all your forum memberships? Go to Profile > My Account > Forum Notifications, and check 'daily consolidated digest.' Switch the discussion email drop down to 'no email' or you will receive both.

    Rocket U2 | UniVerse & UniData

    Post New Message Online
    Re: UniObjects for .NET
    Reply to Group Online Reply to Group
    Nik Kesic
    Apr 12, 2021 2:07 PM
    Nik Kesic
    Hello Sergio

    Try this in your catch block 
    ...
    class Program
    {
         static void Main(string[] args)
         {
         UniSession us1 = null;
         try
           {
            UniSubroutine uSub = us1.CreateUniSubroutine("TIMESUB", 3);   // my subroutine has 2 properties
            ...
            }
    ...
         catch (Exception e)
         {
         if (us1 != null && us1.IsActive)
           {
           Console.WriteLine("Error ... " + e.Message);
           Console.WriteLine("Last Errors ... " + us1.LastServerError);
           UniObjects.CloseSession(us1);
           us1 = null;
           }
      }
    ...



    Error ... [Rocket U2][UODOTNET - UNICLIENT][ErrorCode=30106] Wrong number of arguments supplied to the subroutine
    Last Errors ... In /usr/udthome/demo/CTLG/TIMESUB at line 1 Error, SUBROUTINE 'TIMESUB' has different number of arguments than its CALL statement.



    ------------------------------
    Nik Kesic
    LKQ
    ------------------------------
      Reply to Group Online   View Thread   Recommend   Forward   Flag as Inappropriate   Post New Message Online