We want to retrieve data from a Navision 3.70 C/Side database using .NET. We managed to create a DSN and retrieve data from the Navision database by using Excel or MSQuery.
When i try to read data from my .NET application using the same DSN i get an error:
ERROR[IM001][Microsoft][ODBC Driver Manager]Driver does not support this function
.NET code (C#)
=============
OdbcConnection conODBC = new OdbcConnection(“DSN=Sample C/ODBC 32 bit”);
conODBC.Open();
DataTable dt=new DataTable();
OdbcDataAdapter da = new OdbcDataAdapter("SELECT * FROM Klant", conODBC);
da.Fill(dt);
============================================================================
The first two lines successfully connect to the Navision database (which is specified in the DSN).
The last two lines should retrieve data from the database but instead they give the error.
Can anyone help?
0
Comments
C/ODBC does not support .NET datasets. If you want to use a data set, you’ll have to create your own.
Example:
Or create a structure. A better solution is to run the Navision native database on a SQL server. But than you’ll have to keep in mind that the data should only be read. If you’ll write in a Navision SQL database with ODBC, the Navision data will get corrupt. I hope it helps…
If you’ll find anything else, please let me know.
Henry
I haven’t tried it yet, but I don’t think so.
Rgds/M
EDIT: damn, I just noticed that that was exactly what the original poster was trying to do, but it failed for him. OK, never mind, I'll shut up now...