I used UV subroutines extensively from VB6 and never had any problems. I am not sure at this point how named common was used in that area.
I can tell you that my previous company tried to use named common in a manner similar to what you are trying, but this was in straight UV programming. We did experience strange problems with the file variables too. In the end we had to back off on using named common to track file variables as a global solution. This was back in UV 9.6.?. Rich Taylor | Senior Programmer/Analyst| VERTIS 250 W. Pratt Street | Baltimore, MD 21201 P 410.361.8688 | F 410.528.0319 [EMAIL PROTECTED] | http://www.vertisinc.com Vertis is the premier provider of targeted advertising, media, and marketing services that drive consumers to marketers more effectively. "The more they complicate the plumbing the easier it is to stop up the drain" - Montgomery Scott NCC-1701 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kryka, Richard Sent: Tuesday, January 11, 2005 12:57 PM To: u2-users@listserver.u2ug.org Subject: [U2] Named Common Issues in UV Has anyone seen any issues with using named common in UV subroutines called by VB6? I ran some tests and determined that named common works in this environment, but have experienced some strangeness since implementing it. We have around 300 UV subroutines, with named common in fewer than 25. The goal is to keep from having to open the files every time the subroutine is called. The problems seem to occur in the routines with named common. Strangeness includes not being able to find a file, and getting data from the wrong file or ID. These 25 routines are used extensively, but the failures happen very rarely and sporadically, so are difficult to monitor. I have temporarily removed the named common to see if the strangeness goes away. All named common names are unique. UniVerse 10.0.10-2 on MS2000 Server. Sample VB6 code: Public Sub Get_Notes() On Error GoTo Form_Err Dim NoteObj As Object Dim ResultArray As Object Dim ArrayIndex As Integer Dim ArrayEnd As Integer Const RETURN_PARAM = 3 Const TOTAL_PARAM = 4 Const PAGE_RETURN = 1 lstNotes.Clear Set ResultArray = CreateObject(UV_DARRAY_OBJECT) Set NoteObj = uvSession.subroutine("VBNOTEPAGE3", TOTAL_PARAM) NoteObj.SetArg 0, txtNoteID.Text NoteObj.SetArg 1, CurPageNo NoteObj.SetArg 2, txtTypeNote.Text NoteObj.Call ResultArray = NoteObj.GetArg(RETURN_PARAM) ArrayEnd = ResultArray.Count If ArrayEnd >= 1 Then For ArrayIndex = 1 To ArrayEnd lstNotes.AddItem ResultArray.Field(ArrayIndex) Next ArrayIndex End If txtPageDisplay = "Page " & CurPageNo & " of " & PageLimit Form_Exit: Exit Sub Form_Err: MsgBox "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description, , "frmNoteMaint: Get_Notes" Resume Form_Exit End Sub Sample UV code: 0001: SUBROUTINE VBNOTEPAGE3(NOTE.ID,NOTE.PAGE,FILE.ID,RET.ARRAY) 0002: * ---------------------------------------------------------------------- 0003: * PROGRAM NAME : VBNOTEPAGE3 0004: * CREATED BY : TODD C. SELLS 0005: * PROGRAMMER : TSELLS 0006: * DATE CREATED : 0007: * ---------------------------------------------------------------------- 0008: * LAST MODIFIED : 0009: * 09/30/04 KRYKA - DISPLAY ONLY FIRST OCCURANCE OF DATE, SHIFT AUTO NOTE S TO RIGHT 0010: * 10/14/04 KRYKA - CLONED FROM VBNOTEPAGE. ADD USER AND TIME 0011: * 10/20/04 KRYKA - ADD NAMED COMMON 0012: * 01/11/05 KRYKA - REMOVE NAMED COMMON 0013: * ---------------------------------------------------------------------- 0014: * ---------------------------------------------------------------------- 0015: * INITIALIZE STANDARD VARIABLES AND INCLUDE FILES 0016: * ---------------------------------------------------------------------- 0017: EQU TRUE TO 1 0018: EQU FALSE TO 0 0019: * ---------------------------------------------------------------------- 0020: * INITIALIZE VARIABLES 0021: * ---------------------------------------------------------------------- 0022: COMMON /VBNOTEPAGE3/ INIT.PATH, 0023: CLIENT.NOTE.MASTER, 0024: DELETED.NOTES, 0025: APPT.NOTES, 0026: CRED.NOTES, 0027: POLICY.NOTES 0028: * 0029: IF INIT.PATH # @PATH THEN 0030: OPEN "CLIENT-NOTE-MASTER" TO CLIENT.NOTE.MASTER ELSE 0031: RET.ARRAY = "CANNOT OPEN CLIENT-NOTE-MASTER FILE " 0032: RETURN 0033: END 0034: OPEN "DELETED.NOTES" TO DELETED.NOTES ELSE 0035: RET.ARRAY = "CANNOT OPEN DELETED.NOTES FILE " 0036: RETURN 0037: END 0038: OPEN "APPT-NOTES" TO APPT.NOTES ELSE 0039: RET.ARRAY = "CANNOT OPEN APPT-NOTES FILE " 0040: RETURN 0041: END 0042: OPEN "CRED-NOTES" TO CRED.NOTES ELSE 0043: RET.ARRAY = "CANNOT OPEN DELETED.NOTES FILE " 0044: RETURN 0045: END 0046: OPEN "POLICY-NOTES" TO POLICY.NOTES ELSE 0047: RET.ARRAY = "CANNOT OPEN POLICY-NOTES FILE " 0048: RETURN 0049: END 0050: * 0051: INIT.PATH = @PATH 0052: END 0053: * etc Dick Kryka Director of Applications CCCS of Greater Denver, Inc. Paragon Financial Services 303-632-2226 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/