adriankohws
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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",
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.
ASKER
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.