Navision Integration :(

vaibhav_soul
Member Posts: 17
Hi folks!
This is my first post in the forum, though I have been a fan of this forum since a long long time!! A bit about me - I am a certified navision solution developer working for a company in Australia.
I am currently looking at integration between navision and one of our products. I was thinking about writing an integration module in .NET. Basically, I looked at the sample code given by microsoft and thought I would venture out to do it on my own. The first step is itself an issue now ](*,)
This is my code (C#.NET) -
I get an error saying -
"The Navision CFront initialization failed, with following error: . Please verify that CFront.dll/CFrontsql.dll are available and located in the directory where the application is started."
However, my directory does contain both the files. I have also added reference to CFRONT.OCX file. (I could not add the other two dlls - cfront and cfrontsql as reference - throws errors).
Can you please tell me what I am missing????? [-o<
This is my first post in the forum, though I have been a fan of this forum since a long long time!! A bit about me - I am a certified navision solution developer working for a company in Australia.
I am currently looking at integration between navision and one of our products. I was thinking about writing an integration module in .NET. Basically, I looked at the sample code given by microsoft and thought I would venture out to do it on my own. The first step is itself an issue now ](*,)
This is my code (C#.NET) -
public void InitializeCFront() { CFrontDotNet.DriverType = NavisionDriverType.Native; CFrontDotNet.NavisionPath = @"D:\Program Files\Microsoft Dynamics NAV\CSIDE Client"; CFrontDotNet.Instance.Init(); } public void ConnectToServer() { try { CFrontDotNet.Instance.ConnectServerAndOpenDatabase("", NavisionNetType.NativeTcp, @"D:\Program Files\Microsoft Dynamics NAV\CSIDE Client\Database.fdb", 2000, false, true, "", ""); CFrontDotNet.Instance.OpenCompany(CFrontDotNet.Instance.NextCompany(null)); // Open First Company } catch { CFrontDotNet.Instance.DisconnectServer(); } }
I get an error saying -
"The Navision CFront initialization failed, with following error: . Please verify that CFront.dll/CFrontsql.dll are available and located in the directory where the application is started."
However, my directory does contain both the files. I have also added reference to CFRONT.OCX file. (I could not add the other two dlls - cfront and cfrontsql as reference - throws errors).
Can you please tell me what I am missing????? [-o<
0
Comments
-
By the way, I have a function that calls
InitializeCFront
and
ConnectToServer
one after another.
I have tried to specify the database in the ConnectServerAndOpenDatabase function, but doesn't help.0 -
Got it!!!!!
(Thanks if any of you were trying to help)0 -
vaibhav_soul wrote:Got it!!!!!
(Thanks if any of you were trying to help)
Shall you post the solution for others who will have same problem?
Thanks.0 -
Waldo wrote:Just wanted to post my two cents on this:
Mind what you're doing when creating some kind of integration tool outside of NAV. With C/FRONT, no validation triggers are called withing NAV!
That is true. I am using C/FRONT only to get some data out of the system. I prefer using MSMQ for rest of the operations (Only thing- I still need to figure out how exactly I would go about coding it).
Another thing I have found is that there is no enough material out there about NAV integration with third party software. Its all trial and error. The only material that comes with the "doc" section is using C, and I dont know if there are lots of people who are new to Navision and would like to write integration with C. (ok, no more ranting)
0 -
kine wrote:vaibhav_soul wrote:Got it!!!!!
(Thanks if any of you were trying to help)
Shall you post the solution for others who will have same problem?
Thanks.
hmmm.. my EXE was going to a different folder than the one that is generally default for Visual Studio settings. So naturally it could not find the files! #-o
Its just wierd that it took time to know what was happening :-k0 -
vaibhav_soul wrote:Waldo wrote:Just wanted to post my two cents on this:
Mind what you're doing when creating some kind of integration tool outside of NAV. With C/FRONT, no validation triggers are called withing NAV!
That is true. I am using C/FRONT only to get some data out of the system. I prefer using MSMQ for rest of the operations (Only thing- I still need to figure out how exactly I would go about coding it).
If i'm not mistaken, there is a how-to on MSDN somewhere... . Yep, here it is:
http://msdn2.microsoft.com/en-us/library/ms952182.aspx0 -
vaibhav_soul wrote:kine wrote:vaibhav_soul wrote:Got it!!!!!
(Thanks if any of you were trying to help)
Shall you post the solution for others who will have same problem?
Thanks.
hmmm.. my EXE was going to a different folder than the one that is generally default for Visual Studio settings. So naturally it could not find the files! #-o
Its just wierd that it took time to know what was happening :-k
Hi,
Can you share with me what exactly you did? Provide steps.
Thanks,
Bhavin0 -
I'm having exactly the same issue, but mine is a little more complicated I think.
I am actually writing a number of web services using C# in VS2010 that use CFrontDotNet to communicate with a Nav 5.0 database.
I am also writing a Winforms application as a test platform which is being developed in parallel on the same machine as my web services solution.
If I run a method that connects to Navision on my winforms app, it works fine. If I cut and paste the same function into my web services app and try to run it, I get an error.
The code I try to run is shown here...
path = @C:\Program Files (x86)\Microsoft Dynamics NAV\CSIDE Client;
cfront.SetNavisionPath(path);
... and the error I get is shown here...
The Navision CFront initialization failed, with following error: . Please verify that CFront.dll/CFrontsql.dll are available and located in the directory where the application is started.
Why is it a winforms application can SetNavisionPath ok, but a web services application running on the same server, with the same code can't?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