Re: [U2] RE: U2] Error 30107 when calling Subroutines from UniObjects
Peter, if you can get their uniobjects menu driver to initialise a common then all you need do is INCLUDE it in the subroutines called. If there are files you dont want to open globally to all applications you can set up a common just for a particular application. If you want some code examples contact me offline. jak - Original Message - From: peter watson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 21, 2004 5:11 AM Subject: [U2] RE: U2] Error 30107 when calling Subroutines from UniObjects Hi all who have tried to help we (my company) have just had a reply from our application vendor, they have stated that to enable UniObjects to run there subroutines they would have to rewrite them to enable root or a login that does not process the startup routines to run them. does anyone know what area I should be getting the more knowegable people to look in for what needs starting, as advised by Jim I would like to try an INIT paragraph. Pete -Original Message- From: Jim Epley [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 21:24 To: peter watson Subject: U2] Error 30107 when calling Subroutines from UniObjects Peter, I have encountered the same problem when invoking a VAR subroutine from a UniObjects for Java program. Here's what I found out that finally fixed my problem: 1) the subroutine must be properly cataloged (I assume you've already taken care of this), and 2) any session initialization that the subroutine depends on must be accomplished. In our case, the VAR has an INIT paragraph that values some global default parameters for the application that must be executed before the subroutine will execute correctly. I added command calls to the UOJ code to execute the paragraphs, and that fixed the problem. I'd guess you're running into the same kind of issue. HTH Jim Epley Midlands Technical College Columbia, SC UniData 6.0 Tru64 V5.1 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
Re: [U2] RE: U2] Error 30107 when calling Subroutines from UniObjects
Patrick Will Williams, President American Computer Technics, Inc. 919-567-0042 Raleigh, NC - Original Message - From: John Kent To: [EMAIL PROTECTED] Sent: Thursday, May 20, 2004 3:18 PM Subject: Re: [U2] RE: U2] Error 30107 when calling Subroutines from UniObjects Peter, if you can get their uniobjects menu driver to initialise a common then all you need do is INCLUDE it in the subroutines called. If there are files you dont want to open globally to all applications you can set up a common just for a particular application. If you want some code examples contact me offline. jak - Original Message - From: peter watson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 21, 2004 5:11 AM Subject: [U2] RE: U2] Error 30107 when calling Subroutines from UniObjects Hi all who have tried to help we (my company) have just had a reply from our application vendor, they have stated that to enable UniObjects to run there subroutines they would have to rewrite them to enable root or a login that does not process the startup routines to run them. does anyone know what area I should be getting the more knowegable people to look in for what needs starting, as advised by Jim I would like to try an INIT paragraph. Pete -Original Message- From: Jim Epley [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 21:24 To: peter watson Subject: U2] Error 30107 when calling Subroutines from UniObjects Peter, I have encountered the same problem when invoking a VAR subroutine from a UniObjects for Java program. Here's what I found out that finally fixed my problem: 1) the subroutine must be properly cataloged (I assume you've already taken care of this), and 2) any session initialization that the subroutine depends on must be accomplished. In our case, the VAR has an INIT paragraph that values some global default parameters for the application that must be executed before the subroutine will execute correctly. I added command calls to the UOJ code to execute the paragraphs, and that fixed the problem. I'd guess you're running into the same kind of issue. HTH Jim Epley Midlands Technical College Columbia, SC UniData 6.0 Tru64 V5.1 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 --- u2-users mailing list [EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users
[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
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
RE: [U2] Error 30107 when calling SubRoutines from UniObjects
You need to set args 1 thru 4 to before the call... (unless I missed that somewhere) -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 10:12 AM 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
RE: [U2] Error 30107 when calling SubRoutines from UniObjects
I'm certainly not a VB expert, but I think the failure may have to do with this line: Dim cu As Object = m_uniobject.Subroutine(MVACNOT, 4) Here is a snippet of code from our application: Public Sub Load_Detail() 'Declarations Dim DetailObj As Object Dim ResultArray As Object Const TOTAL_PARAM = 11 'Main Set ResultArray = CreateObject(UV_DARRAY_OBJECT) Set DetailObj = uvSession.subroutine(VBDISTRIBUTEAR, TOTAL_PARAM) DetailObj.SetArg 0, txtCredId.Text DetailObj.SetArg 1, txtInvoiceNo.Text DetailObj.SetArg 2, cmbRfId.Text If OptWriteOff.Value = True Then DetailObj.SetArg 3, WriteOff Else DetailObj.SetArg 3, Receipt End If DetailObj.SetArg 4, strAcctClient DetailObj.SetArg 5, intAcctDebt DetailObj.Call ResultArray = DetailObj.GetArg(6) 'store array in this field for later use txtDetailAccept.Text = DetailObj.GetArg(6) strDistAmount = DetailObj.GetArg(9) strDetailBalance = DetailObj.GetArg(10) intDetailCount = ResultArray.Count End Sub Dick Kryka Director of Applications CCCS of Greater Denver, Inc. Paragon Financial Services 303-632-2226 [EMAIL PROTECTED] -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 8:12 AM 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
RE: [U2] Error 30107 when calling SubRoutines from UniObjects
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
RE: [U2] Error 30107 when calling SubRoutines from UniObjects
Hi I am useing VB.NET and the set keyword has been removed, maybe it is time I tried a version of my code in VB6 to see if it is in fact a .NET with UniObjects problem. -Original Message- From: Kryka, Richard [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 16:12 To: [EMAIL PROTECTED] Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects I'm certainly not a VB expert, but I think the failure may have to do with this line: Dim cu As Object = m_uniobject.Subroutine(MVACNOT, 4) Here is a snippet of code from our application: Public Sub Load_Detail() 'Declarations Dim DetailObj As Object Dim ResultArray As Object Const TOTAL_PARAM = 11 'Main Set ResultArray = CreateObject(UV_DARRAY_OBJECT) Set DetailObj = uvSession.subroutine(VBDISTRIBUTEAR, TOTAL_PARAM) DetailObj.SetArg 0, txtCredId.Text DetailObj.SetArg 1, txtInvoiceNo.Text DetailObj.SetArg 2, cmbRfId.Text If OptWriteOff.Value = True Then DetailObj.SetArg 3, WriteOff Else DetailObj.SetArg 3, Receipt End If DetailObj.SetArg 4, strAcctClient DetailObj.SetArg 5, intAcctDebt DetailObj.Call ResultArray = DetailObj.GetArg(6) 'store array in this field for later use txtDetailAccept.Text = DetailObj.GetArg(6) strDistAmount = DetailObj.GetArg(9) strDetailBalance = DetailObj.GetArg(10) intDetailCount = ResultArray.Count End Sub Dick Kryka Director of Applications CCCS of Greater Denver, Inc. Paragon Financial Services 303-632-2226 [EMAIL PROTECTED] -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 8:12 AM 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
RE: [U2] Error 30107 when calling SubRoutines from UniObjects
You need 1 less arg. 0-3 is 4 args... Subroutine only has 4 args. -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 12:08 PM To: [EMAIL PROTECTED] Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects Just tried that still get same error and I need to pass the last three args or the subroutine will not know what to do and arg 0 is a return arg -Original Message- From: Marc Harbeson [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 16:06 To: [EMAIL PROTECTED] Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects You need to set args 1 thru 4 to before the call... (unless I missed that somewhere) -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 10:12 AM 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
Re: [U2] Error 30107 when calling SubRoutines from UniObjects
if SUBR(MVACNOT,@ID,'DATE()','OW') is from an existing I-type then change your argument 3 to DATE() given this syntax they are looking for the string value of DATE() somewhere in the code and not how we normally think of DATE() its worth a try, Rich peter watson wrote: The subroutines are note wrote or owned by us and we are not supposted to create or alter them and they work fine if called by I-descripors therefore I would believe they work. I have just replicated my VB.NET code in VB6 and get the same error therefore I am going to give up and believe that the company who wrote and own the subroutines have wrote them in a way that means they can not be called from UniObjects. -Original Message- From: Ross Craig [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 16:31 To: [EMAIL PROTECTED] Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects You should test all of your subroutines by calling them from universe before trying to get them to work in VB. You can use the debugger to step through your code. Create a calling program in universe to pass the subroutine the necessary parameters. Ross Craig Alaska Diesel Electric -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 7:12 AM 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
Re: [U2] Error 30107 when calling SubRoutines from UniObjects
to Excel its even easier as you can paste records to rows and avoid a for loop jak - Original Message - From: peter watson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 20, 2004 2:20 AM Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects The subroutines are note wrote or owned by us and we are not supposted to create or alter them and they work fine if called by I-descripors therefore I would believe they work. I have just replicated my VB.NET code in VB6 and get the same error therefore I am going to give up and believe that the company who wrote and own the subroutines have wrote them in a way that means they can not be called from UniObjects. -Original Message- From: Ross Craig [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 16:31 To: [EMAIL PROTECTED] Subject: RE: [U2] Error 30107 when calling SubRoutines from UniObjects You should test all of your subroutines by calling them from universe before trying to get them to work in VB. You can use the debugger to step through your code. Create a calling program in universe to pass the subroutine the necessary parameters. Ross Craig Alaska Diesel Electric -Original Message- From: peter watson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 7:12 AM 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