• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1045
  • Last Modified:

Connecting to Navision Native Database using VB.Net


Just wondering how can I connect to a Navision Native Database just like how we connect to a MSSQL?

I meant if we need any reference and how is the connection string?

  • 2
1 Solution
This document on using ODBC with Navision seems to have the information you need


Check your CD for the ODBC driver
It's in the 'nodbc' folder of the NAV product cd

adriankohwsAuthor Commented:
Thanks. Yeah, I google and found too and verified with our technical manager that we have this driver in our installation DVD. Need to explore how to manipulate the database using this, hopefully similar to other .net drivers.

Although you answered after I found it out myself, but you have given the correct and best answer. There were some people saying cannot use SQL to manipulate, but my technical manager said it can be done. I think having an ODBC should not have problem using SQL.

adriankohwsAuthor Commented:
I tried. Hard to configure but finally worked on the connection, however, the syntax to update a binary (image) into the table is a pain.

  Dim eNODBC As String = "UPDATE Item SET Picture = @img WHERE No. = @No"

            Dim Cmd2 As New Odbc.OdbcCommand(eNODBC, nODBC)
            Cmd2.Parameters.Add(New Odbc.OdbcParameter("@img", arrImage))
            Cmd2.Parameters.Add(New Odbc.OdbcParameter("@No", Code))

Got this error:
ERROR [42000] [Simba][SimbaEngine ODBC Driver]UPDATE Item SET Picture = @<< ??? >>img WHERE No. = @No
ERROR [42000] [Simba][SimbaEngine ODBC Driver]Syntax Error.

Using "?" as parameter also didn't work.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now