Get Data from another Database

billbill Member Posts: 100
edited 2014-06-13 in NAV Three Tier
Hi All. I have an issue. There is a need to run a report and gather data from another database. Is there a way to connect to another database and specific company get the data and transfer them into the other Navision database?

Comments

  • SaalekSaalek Member Posts: 181
    Hi

    Use NAV Webservices to do it.

    Regards
  • billbill Member Posts: 100
    Thanks for your responce.

    Is there a function or somenthing like CHANGECOMPANY in order to do this via C/AL code?
  • billbill Member Posts: 100
    thanks mohana, but this is not my need. I know the CHANGECOMPANY functionality, i asked if there is a function like CHANGECOMANY in order to connect to another database within the same server.
  • SaalekSaalek Member Posts: 181
    Hi

    You can do thinks that we did a few years ago.
    Use ODBC to create a connection to a database and then use Microsoft ADO (or ADO.NET) to manage tables and Info.
    I used it to connect ACCESS and SQL databases, so using NAV ODBC will be similar.

    But, I think the best solution are web services

    Regards
  • Wisa123Wisa123 Member Posts: 308
    If the External Database is on another Server you need a stable Connection to both used DB's:
    Establish a linked Server Connection
    http://msdn.microsoft.com/en-us/library/ms188279.aspx
    Then create a view for all the Data you need.

    If the Database is on the same sqlserver instance just create the view and a NAV table using the LinkedObject <Yes> Property.

    The second possibility would be to solve the issue using WebServices.

    ___
    Wisa
    Austrian NAV/BC Dev
  • billbill Member Posts: 100
    thank you all for your feedback. Your info was very helpful.
Sign In or Register to comment.