Navision and .net

mstallmann
Member Posts: 138
I am getting an error message when I am trying to connect to Navision Database using ODBC in .net. It says the ODBC driver does not support that command. I have a feeling that the ODBC driver is not compatible with .net for some reason. Anyone else have this problem? Resolution? Is there a better way to connect, i.e. using the OCX? MBS support said that is beyond thier support level..bunchof *#($#* :evil: :evil: :evil:
0
Comments
-
There is an ODBC driver for Navision, just make sure you have the right one selected in your references in VS, so you don't use invalid commands in your programming. I haven't done this myself, but other people have so it must be possible.0
-
I have connected to my Navision DB through Visual Studio .net I used the CODBC supplied on the Navision CD.Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0
-
Can you give me more details on how you connected. I am using the following connection string (code syntax is C#):
this.odbcConnection1.ConnectionString = "DRIVER=C/ODBC 32 bit;UID=mike.stallmann;PWD=PWD;SERVER =N;CN=essai, inc.;RD=No;ML=1033;CD=No;BE=Yes;CC=Yes;RO=No;QTYesNo=Yes;IT=All Except DOT;OPT=Text;PPath=C:\\Program Files\\Microsoft Business Solutions-Navision\\Client;NType=TCP;sName=server;CSF=Yes";
I tried using a dataset, and then tried a datareader as such:
this.odbcConnection1.Open();
System.Data.Odbc.OdbcDataReader Reader;
Reader = odbcCommand1.ExecuteReader(CommandBehavior.CloseConnection);
DataGrid1.DataSource = Reader;
Reader.Read();
Response.Write (Reader.GetOrdinal("No_"));
DataGrid1.DataBind();
Reader.Close();0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions