Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049

    Unanswered: Cross table Node Validation (PMed Question)

    I got this PM from a member and I thought I'd just make a topic about it rather than handle it exclusively via PM, so others might benefit from it or provide solutions.

    I have two table:
    NodeTable
    MetaNOdeTable

    NodeTable
    ----------------------------
    NodeId :1
    NodeType:Tools (This NodeId & NodeType are column)

    MetaNodeTable
    -------------------------
    NodeId:1
    SubType: Process (This NodeId & SubType are column)


    Here NodeId ofboth the table are the primary key of that table.There is no FOREIGN Key between this two table.
    But there is a validation rules between this two table...i.e. the SubType of MetaNodeTable depends on the NodeType of NodeTable
    Example: If the NodeType of NodeTable is "Tools" the the SubType of MetaNodeTable will be "Process".

    My quwestion is how I can put this validation at the time of data load.Can check constraints work for this?How can I put a constraint for this validation which?
    I have to put the validation such a way that it will show the constraint violation if I try to insert any wrong data.....

    Please help me.....I am waiting for ur reply.....
    My response to this would be that I don't fully understand the question!

    Why not just have one table called Node with NodeID, NodeType, NodeSubType:

    NodeID: 1
    NodeType: Tools
    NodeSubType: Process

    Seems to do the same thing doesn't it?

    If you can't do that, then you would have to write something maybe in the form's BeforeUpdate event procedure to do your validation... but I still don't believe I fully understand the logic of what you want to do, so I can't get more specific.... yet.

    Cheers

    ST

    Edit: Yes, I PMed the member with a link to this topic
    Last edited by StarTrekker; 03-14-08 at 09:46.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Can the user who asked this question identify who they are please?

    And also provide some sample data to support their question, as it's not very clear!
    George
    Home | Blog

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No response and no return PM either... I guess it's not high priority
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •