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?
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.
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.
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.
Comments
Use NAV Webservices to do it.
Regards
Is there a function or somenthing like CHANGECOMPANY in order to do this via C/AL code?
http://msdn.microsoft.com/en-us/library/dd338929.aspx
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
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
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