Link to home
Start Free TrialLog in
Avatar of adriankohws
adriankohwsFlag for Singapore

asked on

Connecting to Navision Native Database using VB.Net

Hi,

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?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adriankohws

ASKER

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.

Thanks.
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))
      Try
                Cmd2.ExecuteNonQuery()
......


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.