What's the proper syntax for opening a view with COMAPI and VBScript?
This works in VBA:
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = accsession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Dim ARCUSTOMER1 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1
But this throws a "Type mismatch: OpenView was not handled" error in VBScript.
Set accSession = CreateObject("Accpac.Session")
accSession.Init "", "AS", "AS1000", "52A"
accSession.Open "ADMIN", "TEST", "TSTDAT", Date, 0, ""
Set mDBLinkCmpRW = accSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Set mDBLinkSysRW = accSession.OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1
This works in VBA:
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = accsession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Dim ARCUSTOMER1 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1
But this throws a "Type mismatch: OpenView was not handled" error in VBScript.
Set accSession = CreateObject("Accpac.Session")
accSession.Init "", "AS", "AS1000", "52A"
accSession.Open "ADMIN", "TEST", "TSTDAT", Date, 0, ""
Set mDBLinkCmpRW = accSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Set mDBLinkSysRW = accSession.OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1