Options

Wrong Expression

RemcoRemco Member Posts: 81
We have a 4.0 SP1 database and a 4.0 SP3 client. While moving objects from the test to the live-database some strange thing are happening. We are able to import the test-objects in the live-database. The imported objects are compiled. But when you look into the code in some objects literally the words "wrong expression" are in the code. And therefore the object is not compilable and give an error when it is used in a process. Does anybody have a clue what is happening here?

Comments

  • kinekine Member Posts: 12,562
    The test database and live DB are on same version? (SP3?)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • RemcoRemco Member Posts: 81
    Yes, Test and Live are the same.
    We recently did a technical upgrade to 4.0 SP3. The customizations are mainly made with a 4.0 SP1 client. It seems that te problem is that the 4.0 SP3 client cuts the line when the length of a statement is above xx characters. When this happens on the next line the statement "Wrong expression" appears.
  • matteo_montanarimatteo_montanari Member Posts: 189
    Remco wrote:
    Yes, Test and Live are the same.
    We recently did a technical upgrade to 4.0 SP3. The customizations are mainly made with a 4.0 SP1 client. It seems that te problem is that the 4.0 SP3 client cuts the line when the length of a statement is above xx characters. When this happens on the next line the statement "Wrong expression" appears.

    :shock:

    Same Error founded on 4 SP2 (Build 22979)...


    Eto
    Reno Sistemi Navision Developer
  • kinekine Member Posts: 12,562
    Hmmm... never had this problem... may be that I am not using so long lines...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,120
    kine wrote:
    Hmmm... never had this problem... may be that I am not using so long lines...
    The same goes for me.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • WaldoWaldo Member Posts: 3,412
    Me either :|

    You say:
    Yes, Test and Live are the same.
    We recently did a technical upgrade to 4.0 SP3. The customizations are mainly made with a 4.0 SP1 client.
    I don't understand. You do your customizations on a SP1, or there were still some objects that were changed on SP1, upgraded to SP3, then goes wrong when importing in LIVE? In that case, you're probably not able to compile all objects in the TEST environment either?

    Can you explain more about the current installation?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • RemcoRemco Member Posts: 81
    We started with a SP1 database. All customizations where made in the SP1 client. Because of citrix-problems we technically upgrade to SP3. After that we continued with developing.

    However I have some extra information on this issue. It is mainly happening when you make a C/Side copy of the SQL-database. You make a fbk from the SQL-database. Restore it in a C/Side database. In the C/Side database the statement Wrong Expression has been added to some objects during the restore. Then these objects are not compilable anymore.
  • DenSterDenSter Member Posts: 8,307
    I've made it a habit of developing on the same version as my customer, and never had any of these issues. Well I had issues of course, but I could reproduce those issues because I use the same version as my customer.

    I am not convinced that this is due to SQL Server vs the native client, since the allowed space for code should not depend on that. I would suggest spreading the code over more than one line.
  • krikikriki Member, Moderator Posts: 9,120
    DenSter wrote:
    I've made it a habit of developing on the same version as my customer, and never had any of these issues. Well I had issues of course, but I could reproduce those issues because I use the same version as my customer.
    You can develop on another version than the one the customer uses? :shock: :shock: :shock: :shock:
    Just kidding. It doesn't come to my mind using another version. Because at least you see what the effects are and you are sure you don't use things that on the customer-DB doesn't work. I even try to work on the same DB (SQL or Navision) as the customer.
    And even then I sometimes have issues because of a different build. (Like the report-margin on 400SP2).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DenSterDenSter Member Posts: 8,307
    Some things you can't help (printer settings affecting margins or default fonts for instance), but what I meant that if customer A runs on SQL Server, then I develop for customer A on SQL Server.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    I have had this same issue on 3.70 native DB. We had three databases theoretically identical, all running 3.70B, 2 on a server, one local.

    We would see this problem from time to time, and it seemed to be connected to options that had been removed some how. For example a command such as Report.run(REPORT::"My report",blah blah) then if the report did not exist in the other database the object was a mess (or it might have been in the properties of a control) but always something about a Navision internal option type field. . and exactly as you say the object would have the text "Wrong Expression", though not always exactly where the actual error was.

    The environment was dev -> Test -> Live, and I needed it to be stable and reliable, so rather then try to figure it all out, and since it only happened a couple of times, I just cleaned things up manually.

    By the way, though I really never went into it in detail, the developer was taking Text objects from live and comparing them to his local, and text merging and importing. The exporting as FOB to the test DB. I got the feeling that it was somewhere in the Text merge that the error was happening, like a bad EOF or something.

    I know this does not help you, I just post it to let you know that you are not going mad or anything like that.

    Out of curiosity, has then been a text merge somewhere in your process.

    Oh and one more thing, the identical objects had different blob sizes in the different databases, that concerned me.
    David Singleton
  • RemcoRemco Member Posts: 81
    Hi Guys,

    It is not an issue what you mention. We are developing on the customers develop database. First we opened the SP1-database with a SP1 client, but after problems occured with the citrix-connection we open the database with a SP3 client. Everybody is working with a SP3-client now. Also the users. That's all. Since then this problem occurs sometimes.
  • RemcoRemco Member Posts: 81
    Thanks David for your answer
  • krikikriki Member, Moderator Posts: 9,120
    Oh and one more thing, the identical objects had different blob sizes in the different databases, that concerned me.
    That happens easily : just compile the objects and they can change sizes.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • David_SingletonDavid_Singleton Member Posts: 5,479
    kriki wrote:
    That happens easily : just compile the objects and they can change sizes.

    Yeah I know it happens, (for instance objects compiled in an earlier version of Navision and imported to a newer version, all the defaults and new properties can extend the size when you recompile, but that is documented), but when it happens on exactly the same version, it is just something that I don't like.
    David Singleton
  • kinekine Member Posts: 12,562
    but when it happens on exactly the same version, it is just something that I don't like.

    But it happens - because for example you changed some object which is used int this object... :-) And sometime the size changes 2-times when you do compile, compile right after each other... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,120
    kine wrote:
    but when it happens on exactly the same version, it is just something that I don't like.

    But it happens - because for example you changed some object which is used int this object... :-) And sometime the size changes 2-times when you do compile, compile right after each other... ;-)
    Exactly.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.