NavisionValue Data; String NavisionPath = "C:\\Program Files\\Microsoft Dynamics NAV\\CSIDE Client\\"; CFrontDotNet front=new CFrontDotNet(NavisionDriverType.Sql,NavisionPath); int CT; // Currentt Table. Keep name short, since we need to type it in a lot int CR; // CurrentRecord. Keep name short, as above front.ConnectServerAndOpenDatabase("Navision", NavisionNetType.SqlDefault, "my_database", 2000, true, false,"demo", "demo"); front.OpenCompany("Test company"); CT = front.OpenTable(18); CR = front.AllocRecord(CT); front.FindFirstRecord(CT, CR); Data = front.GetFieldData(CT, CR, 2); NavisionText NAVText; NAVText = Data; textBox1.Text = NAVText.ToString(); // Important: Close down Navision when finished. front.FreeRecord(CR); front.CloseTable(CT); front.CloseCompany(); front.CloseDatabase(); front.DisconnectServer(); front.Dispose();
Comments
I would suggest using 4.00 SP3.