Registering OCX on Navision 2.60E

johjoh5johjoh5 Member Posts: 6
edited 2005-10-13 in Navision Financials
Can anyone help me? I am registering a Tposx100.dll on a Navision 2.60E client Windows XP Pro. Eveything runs smoothly - the form/codeunit runs ok - if I do not close the client.
However if I close and open again the client - I can not run my form anymore - the client freezes. But the form/codeunit compiles and the variable looks fine. I have several others setups like this one on Windows 2000. I am using the same .dll file as the other stations - just copied it over and have registered it locally and centrally. Can anyone help me..... :)

Comments

  • kinekine Member Posts: 12,562
    It seems like some problems (conflict) with other applications or dlls... what is it Tposx100.dll? I do not know such a library...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • johjoh5johjoh5 Member Posts: 6
    The system is Navision POS and is communicatino with a Credit card POS. What puzzles me is the fact that is works fine - as long as I keep the client running after I registered it in Custom Controls. I even change the licence file back to the clients file. Any Ideas ? Thanks for your reply.
  • kinekine Member Posts: 12,562
    May be that there is problem, that the Navision open connection with the POS system but when terminating Navision, this communication is not closed and on next attempt to connect to the POS the system say that the comm is opened with another app...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,307
    It sounds to me like the component is kept in memory somehow after you close Navision. In your code, make sure you clear the automation variable from memory:
    CLEAR(MyAutomationVariable);
    
    This should destroy the object and clear it from memory. If your call to the automation is on a form, you will want to put this code in OnCloseForm or something like that. Probably if you are doing this in a defined processm, you should put it at the end of the process.
  • johjoh5johjoh5 Member Posts: 6
    The command on the form triggers a Codeunit wereas on Init the automation variable is cleared CLEAR(TPos); before it is created. This is working fine on several other POS stations - but they all have windows 2000. Thk for reply.
  • kinekine Member Posts: 12,562
    Yes, but is not cleared AFTER the process...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,307
    Right, the key for these automation objects is to maintain the objects, and that includes destroying them when you're done with them. There's a CLEAR statement before the CREATE to make sure there's no error if there is already another instance of that object.

    When you're done with the object (i.e. at the end of your code), use another CLEAR command. It's worth a try isnt it :).
Sign In or Register to comment.