Tag Archives: c/odbc driver

C/ODBC connection for navision

Now a days connecting navision via c/odbc has become essential for navision programmers.

For sql reporting services,crystal reports, programmatic access via vb or c# we need this odbc driver.

It is shipped with navision attain product cd. install it to activate the driver.



Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC), then switch to System DSN and click Add. We will use C/ODBC 32-bit driver. Give Data Source Name Navision, Connection – leave it Local. As the database (Database button) select \Program Files\Navision Attain\Client\database.fdb (this is demo DB).

 Open SQL Server Enterprise Manager. Open object browser on the left side, select Security and Linked Servers. With right click select New Linked Server in the context menu. In the emerging dialog window, in the menu Provider Name select Microsoft OLE DB Provider for ODBC Drivers. Let’s name our Linked Server as NAVISION. In the Data Source string type in ODBC DSN name – NAVISION in our case. Linked Server is ready. Select tables list and we now see Navision Attain tables.

Sample query:

SELECT * FROM OPENQUERY(NAVISION, ‘SELECT * FROM Sales_Line sls, Customer cust WHERE sls.Sell_to_Customer_No_ = cust.No_’)