Friday, June 18, 2010

Handling "Error loading USE or USELSX module"

As far as I understand the error message saying "Error loading USE or USELSX module" occurs in one typical scenario which is as follows.

You define a function. Put that in a script library and call the same on a event, say a button click on a form.
Later for some reason say you have been updating the function in the script library pretty often.
So the invoking code would be of a comparitively older version when compared with the one in the script library. This is one scenario where this error occurs...

There are other scenarios where this would occur. For example delare a constant in the form globals, say

 CONST MYCONST="my value"

Now create a script library. Put the above mentioned code in the declarations section of the same, save the same and include that on the form which we created a before.

Now since the same constant has been defined in multiple places, you will get this error.

Solution

In the designer, select the Application (Database) in the outline (Application Outline).
Now click tools in the top margin.
Click "Recompile All Lotusscript"

As the name implies, all the lotusscript code present in the database will get recompiled.
It will show a progress info and after completion it will show the design elements where duplications or errors exist...

So u can rectify them.

Hope this helps :)

6 comments:

  1. That helped a lot!!! Thank you for helping me to resolve this.

    ReplyDelete
  2. we have a LotusScript scheduled agent in which we wanted to add some LDAP query. We found a library called LSXLDAP on the web that did exactly what we wanted. It successfully working in 32 bit ,however, when I try to run it on our 64 bit server win2008 with R8.5.3 , we receive the following error:
    ===============
    error message: Error loading USE or USELSX module: lsxldap

    We placed the lsxldap.dll in domino folder in server, if we try to run agent from Lotus notes client it work fine

    ReplyDelete
    Replies
    1. whether your issue has been solved ? Could you please advice how to do , thanks . And where I can get the lsxldap.dll file ?

      Delete
  3. It would be better when you give your correct name. Well I dont have a 64 bit server with me. I can do something about this if I can rmd your 64 bit windows

    ReplyDelete
  4. I encounter the same question, when upgrade the server to domino 8.5.3 and windows 2008 64bit. When I recompile All Lotusscript", the error still should up, please advise what else I need do ? Thanks.

    By the way, please tell where I can get the file lsxldap.dll ? Thanks.

    ReplyDelete