Database Test Error

Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
edited 2011-02-25 in NAV Three Tier
Hi guys!

I need help in using Database Test.
I ran the database test checking only the test for tables relationships.
The test stops showing this error:



the problem is it does not tell me in which table it finds the error and it does not save the log file.
Had someone already faced this problem?

Thx in advance
~Rik~
It works as expected... More or Less...

Answers

  • DenSterDenSter Member Posts: 8,307
    Sure it tells you what table it is in, it even tells you the field. Read the error message.
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    DenSter wrote:
    Sure it tells you what table it is in, it even tells you the field. Read the error message.
    First of all, thanks for reply.
    You're right, my query is wrong...
    What I meant was how can I find the table that causes that error in the table Object?
    ~Rik~
    It works as expected... More or Less...
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    I post this topic in the hope that could help other fledg ling programmers like me, facing the same problem.
    A colleague of mine fixed the problem. She launched the db test on groups of table in order to find which table cause this problem on the object table... At the end we find that there was a table in which there was a field with table relation to table object.
    The table relation property was:
    Object WHERE (Type=CONST(Table))
    
    this cause the error above, to correct it she changed the table relation:
    Object.ID WHERE (Type=CONST(Table))
    
    No problems launching again the test.
    Regards...
    ~Rik~
    It works as expected... More or Less...
  • DenSterDenSter Member Posts: 8,307
    Thanks for following up and posting your solution, that is exactly how this community is such a great resource :mrgreen:

    To give you a little bit more information: When the field is not specified in the table relationship, the system will assume that you need the first field. For tables that have only one primary key field that happens to be the first field, that is not a problem. So for instance if you link to the Customer table, or the Item table, not specifying the field will set the link automatically to the "No." field, because it's the first field, and it's the primary key field.

    So when a field is linked to a table that has multiple fields in the primary key, and you need to link to one that is not at the top of the list (Sales Header for instance, or Purchase Header), there will be problems if the field is not specified. In those examples, the "Document Type" field is the first field, and the "No." field is the third. In that case, you have to specifically enter the field to make the table relationship work right.

    What I always do is specifically enter the field that I'm linking to, even when it's the primary key field. That way I never have an issue with table relationships.
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    DenSter wrote:
    Thanks for following up and posting your solution, that is exactly how this community is such a great resource :mrgreen:

    To give you a little bit more information: When the field is not specified in the table relationship, the system will assume that you need the first field. For tables that have only one primary key field that happens to be the first field, that is not a problem. So for instance if you link to the Customer table, or the Item table, not specifying the field will set the link automatically to the "No." field, because it's the first field, and it's the primary key field.

    So when a field is linked to a table that has multiple fields in the primary key, and you need to link to one that is not at the top of the list (Sales Header for instance, or Purchase Header), there will be problems if the field is not specified. In those examples, the "Document Type" field is the first field, and the "No." field is the third. In that case, you have to specifically enter the field to make the table relationship work right.

    What I always do is specifically enter the field that I'm linking to, even when it's the primary key field. That way I never have an issue with table relationships.

    Thank you very much!
    ~Rik~
    It works as expected... More or Less...
Sign In or Register to comment.