Here is the original reply in full: Greetings, The SetProgram method returns zero on failure or a handle to a Security Object on success. The object handle is always greater than 1. It looks like the LookupTask and SetProgram are succeeding. Looking at your full code, you have this conditional statement: If retVAL = 0 Then oGLAccount = oScript.NewObject("GL_Account_bus", oSS) Else Dim mssg = oSS.sLastErrorMsg MsgBox(mssg) End If Since retVAL will only be zero on failure, the Account object will only be instantiated if the SetProgram failed and returned zero. Try changing this logic to test for success by doing something like: If retVAL 0 Then oGLAccount = oScript.NewObject("GL_Account_bus", oSS) Else Dim mssg = oSS.sLastErrorMsg MsgBox(mssg) End If If you have already done this and are still having problems, then please post back with details about any error information that is being returned when the NewObject fails. Thanks, Kent
↧