logo logo

MSSQL Auto Numbering with Clarion Composite Auto Numbering on the same Table

With MSSQL, if you have the SQL side handle the Primary Key then the actual key value is not available until you press OK to save. This is also the case for child relationships only been defined on that field once the parent already exists.

Further …
If the Primary key is an SQL AutoNumber AND you are using a Clarion based Auto number composite key as well. Pressing cancel does not kill the record on inserting. Because the template is trying to find the record using the primary key for which a value has not yet been assign.

If you want to use a combination of MSSQL Auto Numbering identity AND clarion Auto Numbering for 3rd normal form integration / composite key. Then to ensure it works you must flag your CLARION Auto Number key as the primary key in the clarion dictionary to ensure that it works. MSSQL will still auto Number as before on the SQL side.

Hope this is explained clearly enough.


4 Responses to “MSSQL Auto Numbering with Clarion Composite Auto Numbering on the same Table”

  1. Ben says:

    What about using PrimeAutoInc with it’s associated CancelAutoInc to cancel your insert, instead of the Filemanager trying to run PrimeAutoInc once you have completed adding all your data and then there is an error in any case.

    This would typically be just after .Primefields embed on WindowManager.



  2. Zashkaser says:

    It is the coolest site, keep so!

  3. Sdanektir says:

    Hi, good post. I have been woondering about this issue,so thanks for posting. I’ll definitely be coming back to your site.

  4. Vivalkakira says:

    Thanks for the review! I want to say – thank you for this!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.