Late Binding

SOLVED

I need to late bind an application because a number of users do not have Sage 300 on their desktop and I want to use COMAPI to communicate with Sage 300.  I am stumped how to late bind

AccpacCOMAPI.AccpacView. .  If I try to Declare it as an object I get an error message.  Any help?

Parents Reply
  • 0 in reply to Django

    Yes all of those are defined as objects DBLINK_COMPANY, DBLINK_SYSTEM AND dblink_flg_readwrite.  This allows the sub-routine to compile but when I execute the following code the system errors out Run-time error '13" type mismatch.  Set mDBLinkCmpRW = Acsession.OpenDBLink(DBLINK_COMPANY, dblink_flg_readwrite)
    Set mDBLinkSysRW = Acsession.OpenDBLink(DBLINK_SYSTEM, dblink_flg_readwrite). 

    MdblinkCmpRW and mDBlinksysRW are defined as objects.

    For some background, COMAPI is not active until some code in the sub activates it, but this is before setting up the session.  If I activate COMAPI, do not declare the dblink as objects, the sub compiles and runs.  Any way around this.  Option explicit is on.

Children