1

When I am trying to call MapInfo from my PowerBuilder application, with map info pro(full) version "Open table" command is working fine but with mapinfo runtime(proviewer) "Open table" is crashing for the below syntax saying error calling external object.

MIOleObject.application.Do("Open Table 'C:\Jail\DataDir\GcuPerm.tab' as Zones Interactive")

Please suggest me what could be the problem?

4
  • 1
    What is the actual error message?
    – CL.
    Oct 30, 2013 at 10:45
  • The error Message is " Error calling External object function do at line XXX in open event of object XXX"
    – user976239
    Oct 30, 2013 at 11:10
  • 1
    Forgive me if I'm wrong, but aren't Runtime and ProViewer different entities? If its ProViewer that you're using, thats very limited - does it even support what you're trying to do?
    – Mark
    Dec 4, 2013 at 9:20
  • 1
    You are correct: Proviewer can't be automated. Dec 4, 2013 at 10:39

1 Answer 1

1

MapBasic strings must use double quotes.

Are you rally sure you want to use the Interactive option?

MIOleObject.Application.Do("Open Table ~"C:\Jail\DataDir\GcuPerm.tab~" as Zones")
3
  • Thanks for replying. I tried with double quotes but no luck. Yes,I want to use Interactive option because i am performing further actions using these maps. The current code is working absolutely fine with Mapinfo full version but it doesnt work with runtime version. Also, while connecting to Runtime version MIOleObject.ConnectToNewObject("MapInfo.Runtime") works fine but MIOleObject.ConnectToNewObject("MapInfo.Application") is throwing an error. please let me know what other options can i try.
    – user976239
    Oct 30, 2013 at 10:51
  • It's possible that the runtime does not support Interactive.
    – CL.
    Oct 30, 2013 at 13:26
  • Can u please let me know What other options can be used? I tried with MIOleObject.Application.Do("Open Table ~"C:\Jail\DataDir\GcuPerm.tab~" as Zones") But,it dint work either..
    – user976239
    Oct 31, 2013 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.