Thank you Ray. I did not have the subroutine catalogued globally. Now it works 
perfectly.

Thanks,
Tom

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Raymond P. de Bourbon
Sent: Wednesday, December 09, 2009 12:59 PM
To: U2 Users List
Subject: Re: [U2] Uniobject.NET -Unable to load subroutine

This may be a total red herring, but I would try setting both subroutine 
arguments to something, not just the first one - even if you only set them to 
String.Empty. How is the subroutine catalogued BTW?

As for your connection pooling issue - Make sure you are:
1. using a UniObjects DLL that supports pooled connections 2. are connecting to 
a version of UniData/UniVerse that supports pooled connections 3. connecting to 
a server that is licensed for pooled connections..

HTH

Ray

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Leimer, Thomas (SVW)
Sent: 08 December 2009 21:10
To: u2-users@listserver.u2ug.org
Subject: [U2] Uniobject.NET -Unable to load subroutine

I'm getting the error "Unable to load the subroutine on the server"  The 
subroutine is compiled and cataloged.

Also, I had to comment out the 'UniObjects.UOPooling = True, 
'UniObjects.MaxPoolSize = 2, and'UniObjects.MinPoolSize = 1 in order to get a 
connection. Could having this commented out be causing the load subroutine 
error?

Thank you,
Tom



<WebMethod()> _
Public Function last_chance(ByVal strRSA As String) As String
        Dim u2Session As UniSession = Nothing
        Dim rtnMessage As String = String.Empty
        Dim u2Sub As UniSubroutine

        'UniObjects.UOPooling = True
        'UniObjects.MaxPoolSize = 2
        'UniObjects.MinPoolSize = 1


   Try
            u2Session = UniObjects.OpenSession("HOST", "USERNAME", "PASSWORD", 
"ACCOUNT", "udcs")

            Try
                u2Sub =
u2Session.CreateUniSubroutine("AUTO.RSA.SCAN.CHK", 2)
                u2Sub.SetArg(0, strRSA)

                u2Sub.Call()
                rtnMessage = u2Sub.GetArg(1)

            Catch ex As Exception
                rtnMessage = "ERROR - In call to sub - " & ex.ToString
            Finally
                u2Sub = Nothing
                UniObjects.CloseSession(u2Session)
            End Try
        Catch ex As Exception
            rtnMessage = "ERROR - " & ex.ToString
        Finally
            u2Session = Nothing
        End Try

        Return rtnMessage

    End Function

Tom



________________________________
Confidentiality Notice: This message, together with any attachments, is 
intended only for the use of the individual or entity to which it is addressed 
and may contain confidential or privileged information. If you think you have 
received this message in error, please advise the sender and then delete this 
message and any attachments immediately.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to