Hi all !
I have a question: I have to connect my DB NAV (release 2016) with a SQL DB which is not on the same network.
NAV DB an the SQL DB are in two different city, two different network and the SQL DB is used from another program (no NAV).
I have either to read and write to this SQL DB.
Can I connect NAV to SQL?
I'm already using the connection between NAV and an external SQL DB, but always in the same network.
The connection now is managed in this way:
SQLConnection := SQLConnection.SqlConnection(ConnStr);
where
_ SQLConnection=Dotnet variable (System.Data.SqlClient.SqlConnection.'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
_ ConnStr = Text variable with this value:
Data Source= SQLservername; Initial Catalog= SQL DB;User Id= user;Password=password;
Can you help me? Thanks in advance to all.
Davide
0
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I'm not a NAV developer myself, so I cannot help you with your exact question. From an architectural point of view. Isn't it possible to create the connection over HTTP(s) REST (SOAP/OData) webservices? If you create a web API on the external database side you can consume those web services from NAV. This could make the coupling a lot easier.
Remko is right! You should have webservice for you external SQL DB and fetch data from NAV via webservice. Or, create webservice on NAV side and make some stored procedures in you SQL DB to fetch data from NAV. Depends on your task.
Yury
I will update you how I will solve the problem