Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Connecting NAV 2016 to an external SQL Database

$
0
0
I'm trying to connect NAV 2016 to an external SQL Server database. I have it working on my laptop, but cannot get it working on the client system. As per this video, I've set up a codeunit to handle the connection. Here's what the codeunit has in it....

OnRun()
ConnectToSQL;

ConnectToSQL() : Boolean
DoConnectToSQL;

LOCAL DoConnectToSQL()
IF HASTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, 'EclipseNAVTransfer') THEN
UNREGISTERTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, 'EclipseNAVTransfer');

DATABASE.REGISTERTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, 'EclipseNAVTransfer',
'Data Source=lan-nav-sql\LAN-NAV-SQL;Initial Catalog=EclipseNAVTransfer;User ID=customerdomain\navisionservice;Password=p@ssword1');

SETDEFAULTTABLECONNECTION(TABLECONNECTIONTYPE::ExternalSQL, 'EclipseNAVTransfer');

The only difference between the code on my local copy and the code in the client database is "Data Source" path has different server names in it and the "User ID" and "Password" are different.

When I launch the page to display the data, here is the message I get: 3uqk0gbihk82.png



Does anyone that's done this before have anything I should be looking at? As far as I can tell, I have the SQL security set up correctly. The main thing on the client site is that I'm going from the server that's hosting the NAV service over to the SQL Server whereas on my laptop, that's obviously the same box. Also, the database that I'm trying to connect to is on a different SQL Server than the SQL Server that hosting the actual NAV data. Also, the external SQL Server that I'm trying to connect to is SQL-2014 and the NAV SQL Server is SQL-2012.

Any help would be appreciated.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>