white devles is trying kill me - Forum - OpenEdge RDBMS - Progress Community

white devles is trying kill me

 Forum

white devles is trying kill me

  • faq u white devles!

  • Triggers?

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Use a sequence in the following manner:

    INSERT INTO pub.customer VALUES (

        customer_sequence.NEXTVAL,

        ’USA’,

        ’BackCountry Equipment’,

        ’Sugar Hill Road’,

        ’12A’,

        ’Franconia’,

        ’NH’,

        ’03242’,

        ’Dan Egan’,

        ’603-762-2121’,

        ’Kirsten Ulmner’,

        10000.00,

        500.00,

        ’net 10’,

        0,

        ’contact monthly’

    );

  • The functionality you want is a function of the database, not the language used to access it.   I associate this kind of autogenerated sequential id with toy databases like Access.  I've never missed it in millions of lines of ABL.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • The problem with putting stuff like this in the database or triggers is that one then has the logic in two or more places.  Put it all into the application in a data access layer and you can go one place to see relationships, constraints, sources, etc.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • My point is that when you look at the data access code, you can't see the autonumber.  It just happens.  I'd rather have it all in one place.

    Come to PUG Challenge Americas and I will be presenting on a data access layer for ABL.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • My point is that nowhere there do you see ID being assigned a value.  Only from a comment or looking in the dictionary are you going to know how it gets a value and what kind of value it is.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com