CFrontdotnet.dll ignores given NavisionPath

RutgerRutger Member Posts: 2
Currently I am trying to learn about programming with C/Front and C# through the CFrontdotnet dll.

However at the moment I am stuck with the problem that in order to connect to the database, I have to copy it into the debug folder of my VS project.
The reason for this is that the path I give as parameter for Navision seems to be ignored completely. The system keeps looking for it in the VS project folder.
I also have the same problem when running the sample (which came with the install). Does anyone know if this is a known problem (or whether I am overlooking something). (* Same thing with the dll but that is just a small file to move around*)

private string navisionPath = "C:\\Program Files\\NAV400SP1\\Client";
NavisionNetType netType = NavisionNetType.NativeTcp;
NavisionDriverType driverType = NavisionDriverType.Native;
private CFrontDotNet coreAPI;

private void b_Verbind_Click(object sender, EventArgs e)
{
try
{
coreAPI = new CFrontDotNet(driverType,navisionPath);

coreAPI.ConnectServerAndOpenDatabase("",
netType, "database.fdb", 0, false, true, "", "");
coreAPI.CloseDatabase()
coreAPI.DisconnectServer();
}
catch ......


*edit* using 4 sp1. everything is run locally*/edit*
Sign In or Register to comment.