Version error

FlorisBFlorisB Member Posts: 10
edited 2006-10-18 in Navision Attain
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

Comments

  • kinekine Member Posts: 12,562
    Try to set the application path to the 3.60 client (SetNavisionPath).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • FlorisBFlorisB Member Posts: 10
    I'll post de code I'm using:

    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?
    Whoa, became solution developer
  • dick11dick11 Member Posts: 60
    Floris

    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.
    Dick van der Sar

    www.dasautomatisering.nl
  • FlorisBFlorisB Member Posts: 10
    Try to set the application path to the 3.60 client (SetNavisionPath).

    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");
    Whoa, became solution developer
  • kinekine Member Posts: 12,562
    Error 2 in module 1 - module 1 is OS Errors - OS Error 2 is "File not found". You are setting path but parameter is filename... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • FlorisBFlorisB Member Posts: 10
    Ok, I got a little bit further, but now I have an other error:

    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?
    Whoa, became solution developer
  • PhennoPhenno Member Posts: 630
    FlorisB wrote:
    Ok, I got a little bit further, but now I have an other error:

    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.
  • dick11dick11 Member Posts: 60
    Scan your system for fin.stx files.
    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
    Dick van der Sar

    www.dasautomatisering.nl
  • FlorisBFlorisB Member Posts: 10
    Ok, I haven't got the language problem anymore :) . I was setting my path to the wrong navision client installation ](*,)

    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?
    Whoa, became solution developer
  • dick11dick11 Member Posts: 60
    The source is OK.

    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.
    Dick van der Sar

    www.dasautomatisering.nl
  • FlorisBFlorisB Member Posts: 10
    thanks for your quick reply!

    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?
    Whoa, became solution developer
  • kinekine Member Posts: 12,562
    DatabaseName will be empty for Native DB. Try to set the DatabaseName to empty string.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dick11dick11 Member Posts: 60
    How do you mean, open the database single user?

    Servername = "c:\blabla\database.fdb"
    DatabaseName = ""
    Dick van der Sar

    www.dasautomatisering.nl
Sign In or Register to comment.