Hello All,
I've programming an application in c#.net which should open a connection to navision 3.60 database. I have added a refference from the cfront.ocx to my project.
When I try to open a connection to my database, the following error occurs: The server and workstation don't have the same versionnumber.
What could cause this? I'm using the cfront.ocx out of the developer toolkit for navision 3.60.
Can somebody help me with this?
thanks,
Floris
Whoa, became solution developer
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
CFRONTLib.CFRONT cfdn = new CFRONTLib.CFRONT();
int hTable = 5900;
//int hRec;
string Server = "Server:port";
string DatabaseName = "MyDatabase";
string CompanyName = "MyCompany";
string UserID = "Floris";
string Password = "password";
string Driver = "NDBCN";
const string NetType = "TCP";
const int CacheSize = 50000;
const bool UCC = true;
const bool UNTA = false;
try
{
cfdn.ConnectServer(Server, NetType);
cfdn.OpenDatabase(DatabaseName, CacheSize, UCC);
}
catch (Exception ex)
{
throw ex;
}
Is there something wrong in the code perhaps?
I have had more than one's that error.
And NF was always right.
Make sure that on your pc is only one NF version present by deinstalling the old versions and/or scanning your local HD for fin.exe and delete the old one's.
www.dasautomatisering.nl
Ok, I've tried that. I get an other error, error 2 in module 1...
Used the following code:
cfdn.SetNavisionPath("c:\\Program Files\\Navision Attian\\Client\\fin.exe");
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
There are errors in the text conversion (text no. 1959-0 does not exist in the .stx file).
Internal error:47-1
What can I do about this?
it seems that installed language versions are not the same. your client (in c:\program files\...) and db has different language version of stx file.
These files has translated errormessages (the NLD dir has the dutch translations).
I think your have more than one version on your HD. Try to delete the wrong versions.
Or delete all and reinstall NF on your PC
www.dasautomatisering.nl
But now I'm still getting the internal error 2 module 1 error. I checked all my settings, but that seems alright.
The only thing I'm not sure of the server name. Is it correct to place the portno in it? Currently trying it in the following context:
cfdn.ConnectServerAndOpenDatabase(Driver, "IpAddress:2411", NetType, DatabaseName, CacheSize, UCC, UNTA, UserID, Password);
Am I doing something wrong?
But I never use a portnumber.
Try it without it (so change you services file)
Or try to open the database single user (as test) so you can see that goes wrong.
www.dasautomatisering.nl
I've tried it to change the services file as following:
#servername 2411/tcp
That did not do the job. How do you mean, open the database single user?
Just to open it with the client manually?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Servername = "c:\blabla\database.fdb"
DatabaseName = ""
www.dasautomatisering.nl