Hi

That is what is in the I-Descriptor that makes a call to the subRoutine, I included 
this line more to state that when the system calls the subRoutine it only uses three 
Args and when I try to call through uniobjects I HAVE to tell the subroutine method 
there are 4 params and this is possibly my problem.

Pete

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 19 May 2004 15:37
To: [EMAIL PROTECTED]
Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects


<Quote>
This is the first line of the subRoutine I need to call
SUBROUTINE MVACNOT(RETURN.SUPPLIER,ACCOM.CODE,REPORT.DATE,SEARCH.TYPE)

When the system calls this subroutine internally it uses the following

SUBR("MVACNOT",@ID,'DATE()','OW')
</Quote>

Why is DATE() inside single quotes 'DATE()' ?
Is that your problem ?


Amit

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of peter watson
Sent: 19 May 2004 15:12
To: [EMAIL PROTECTED]
Subject: [U2] Error 30107 when calling SubRoutines from UniObjects

Hi
I am having problems with getting a response from any subroutine

I get error number 30107 = The subroutine failed to complete successfully

I have even tried setting Arg(0) to "" but nothing seems to work can anyone
help me please.

here is my code if anyone can tell me why its not working.

Public Function doSubRout(ByVal sRoutine As String, Optional ByVal Params
As String = "") As String
' if Connection failed exit function
If Not Connect() Then
MsgBox("No Connection", MsgBoxStyle.Critical)
Exit Function
End If

Dim myErr As New UniErrors

' Exception on UniObjects Error
m_uniobject.ExceptionOnError = True

' Create subRoutine Object
Dim cu As Object = m_uniobject.Subroutine("MVACNOT", 4)

If m_uniobject.Error <> 0 Then
MsgBox("Error: (" & m_uniobject.Error & ") " +
myErr.getErrStr(m_uniobject.Error))
End If

Try
' Get date in Universe format
Dim Tod As New UniDate
Dim sDate As String = Tod.GetUniDate(DateAdd(DateInterval.Day, 20,
Now)).ToString()

'cu.Resetargs()

' Set subRoutine arguments
cu.SetArg(0, "")
If cu.Error <> 0 Then
MsgBox("Error: (" & cu.Error & ") " + myErr.getErrStr(cu.Error))
End If
cu.SetArg(1, "ZA4")
If cu.Error <> 0 Then
MsgBox("Error: (" & cu.Error & ") " + myErr.getErrStr(cu.Error))
End If
cu.SetArg(2, sDate)
If cu.Error <> 0 Then
MsgBox("Error: (" & cu.Error & ") " + myErr.getErrStr(cu.Error))
End If
cu.SetArg(3, "OW")
If cu.Error <> 0 Then
MsgBox("Error: (" & cu.Error & ") " + myErr.getErrStr(cu.Error))
End If

' call the subRoutine
cu.call()

If cu.Error <> 0 Then
MsgBox("Error: (" & cu.Error & ") " + myErr.getErrStr(cu.Error))
Else
' Display results
MsgBox("Args: " & cu.GetArg(0) & "," & cu.GetArg(1) & "," & cu.GetArg(2) &
"," & cu.GetArg(3))
End If

Disconnect()
Catch ex As Exception
' Error handling
If cu.Error <> 0 Then
MsgBox(ex.Message + vbCrLf + "UniVerse : Error: (" & cu.Error & ") " +
myErr.getErrStr(cu.Error))
End If
Disconnect()
System.GC.Collect()
Return ""
End Try

' Return Result
Return "Args: " & cu.GetArg(0) & "," & cu.GetArg(1) & "," & cu.GetArg(2) &
"," & cu.GetArg(3)
End Function


This is the first line of the subRoutine I need to call
SUBROUTINE MVACNOT(RETURN.SUPPLIER,ACCOM.CODE,REPORT.DATE,SEARCH.TYPE)

When the system calls this subroutine internally it uses the following

SUBR("MVACNOT",@ID,'DATE()','OW')

Pete





The information in this electronic mail message is Confidential and may be
legally privileged.
It is intended solely for the addressees. Access to this internet
electronic mail message by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken
in reliance on it is prohibited and may be unlawful. The sender believes
that this E-mail and any attachments were free
of any virus, worm, Trojan horse, and/or malicious code when sent.
This message and its attachments could have been infected during
transmission. By reading the message and opening any
attachments, the recipient accepts full responsibility for taking
protective and remedial action about viruses and other
defects. The sender's employer is not liable for any loss or damage arising
in any way from this message or its attachments.
-VRG3a-
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users

The information in this electronic mail message is Confidential and may be legally 
privileged.
It is intended solely for the addressees. Access to this internet electronic mail 
message by anyone else is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution or any 
action taken or omitted to be taken
in reliance on it is prohibited and may be unlawful. The sender believes that this 
E-mail and any attachments were free
of any virus, worm, Trojan horse, and/or malicious code when sent.
This message and its attachments could have been infected during transmission. By 
reading the message and opening any
attachments, the recipient accepts full responsibility for taking protective and 
remedial action about viruses and other
defects. The sender's employer is not liable for any loss or damage arising in any way 
from this message or its attachments.
-VRG3a-
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users

Reply via email to