Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error pop up everytime

Status
Not open for further replies.

bryan1207

Programmer
Mar 7, 2018
28
0
0
PH
Did anyone encounter this pop up message?
C743D4CA2392F03E8B471D6B725461C909A73D117AABA7AE5C_pimgpsh_thumbnail_win_distr_jqppa0.jpg

Is this related to the $objecthandle$ commandline?

Thanks,
 
That's not a normal error. What exactly were you doing? Are you running Sage 300 ERP?

Sage 300 Whisperer
 
Oh wait, you're still trying to write a Sage program. You have a simple bug in your code, you need to fix it.

Sage 300 Whisperer
 
I don't know where exactly this error is. My program is just a UI and it just get the company name using the code snippet below:

Code:
            Dim args As String() = Environment.GetCommandLineArgs()
            Dim j As Integer
            For j = 0 To (args.Length - 1)
                ObjectHandle = args(j)
            Next

            hWnd = Me.Handle

            mAccpacSignOn = New AccpacSignonManager.AccpacSignonMgr
            mAccpacSession = New AccpacCOMAPI.AccpacSession

            mAccpacSession.Init(ObjectHandle, "XY", "XY1000", "61A")
            'mAccpacSignOn.Signon(mAccpacSession)
            'mAccpacDBLink = mAccpacSession.OpenDBLink(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY, AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)

            rotoSetObjectWindow(ObjectHandle, hWnd)

            Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
            mDBLinkCmpRW = mAccpacSession.OpenDBLink(AccpacCOMAPI.tagDBLinkTypeEnum.DBLINK_COMPANY, AccpacCOMAPI.tagDBLinkFlagsEnum.DBLINK_FLG_READWRITE)

            Dim CSCOM As AccpacCOMAPI.AccpacView
            Dim CSCOMFields As AccpacCOMAPI.AccpacViewFields
            mDBLinkCmpRW.OpenView("CS0001", CSCOM)
            CSCOMFields = CSCOM.Fields

            CSCOM.Fetch()

The back-end process transaction are coming from the services which is separate program.

Regards,
 
Put in error trapping. You should be able to identify which line of code is causing the issue.
 
You don't need all of that if all you want is the company name, look at the AOM.
AccpacSession.CompanyName

Sage 300 Certified Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top