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?
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You say: 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
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.
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.
RIS Plus, LLC
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).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
RIS Plus, LLC
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.
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.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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.
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... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!