I am new to Navision development, but experienced in C#. I am running on Windows 2003 Server - both webserver and Navision. NODBC.dll driver version is 5.00.24199.00.
I am trying to built an ASP.NET webinterface for a Native Navision database - I am using the C/ODBC drivers for Navision and connecting via System.Data.Odbc. Upgrading to SQL database is unfortunately not an option.
I get this error:
ERROR  [Simba][SimbaEngine ODBC Driver]SELECT DISTINCT (<< ??? >>[Field 1]) FROM dbo.MyTable
The query I am running is the following:
SELECT DISTINCT ([Field 1]) FROM dbo.MyTable
- however the SimbaEngine driver (C/ODBC) appends the << ??? >> in the query…
I have tried removing brackets, removing “dbo.” - but no luck… what am I missing?
According to Microsoft Dynamics™ NAV ODBC Driver 5.0 Guide, DISTINCT keyword is supported.
part of my C# source:
DataSet result = new DataSet();
OdbcDataAdapter OdbcDA = new OdbcDataAdapter();
OdbcCommand cmd = new OdbcCommand();
cmd.Connection = new OdbcConnection(ConfigurationManager.ConnectionStrings[“myConn”].ToString());
cmd.CommandType = CommandType.Text;
cmd.CommandTimeout = 600;
cmd.Connection.ConnectionTimeout = 600;
cmd.CommandText = “SELECT DISTINCT ([Field 1]) FROM dbo.MyTable”;
OdbcDA.SelectCommand = cmd;
Hoping for some help