Rash thoughts about .NET, C#, F# and Dynamics NAV.


"Every solution will only lead to new problems."

Monday, 14. August 2006


Oracle Integration into Dynamics Nav

Filed under: English posts,Navision,Oracle — Steffen Forkmann at 12:29 Uhr

Today I want to describe a way to integrate Oracle into Navision. We use this way to migrate selected Tables and Views (rawdata) completely automatic into Dynamics Nav. This means we generate the Table-Structure (as a copy of the Oracle data dictionary) and import the data on the fly.

Oracle Data Provider

First of all one have to install the ODP.NET (Oracle Data Provider for .NET).

Then create a new C# ClassLibrary-Project and add a reference to the installed OracleDataAccess-Assembly. (see Sample-Project as Reference)

Install your COM-Object. (You can let Visual Studio do this for you)

Then create a Navision-Object which connects to the ClassLibrary and interact with Oracle.

IF g_MigrationHelper.OracleConnect( 
  g_ORAUserName,g_ORAPassword,g_ORADataSource) 
THEN BEGIN 
  IF p_Test THEN BEGIN 
    MESSAGE('Connection open'); 
    g_MigrationHelper.CloseOracleConnection; 
  END 
END ELSE 
  ERROR('Connection failed');
Tags: ,