This is what I suspected en mentioned earlier, but is also not what I want, as the source id is not unique. The source databases are generated and the SourceId starts counting from 1 again. You will get duplicates for the id in the destination table.
So it's not possible to use auto-increment ids in combination with CardExchange, what's the use then of the the option in CE to let the dbms generate the ids? Doesn't this work? It just doesn't make any sense to me.
If you can confirm it is not possible at all, I will look for another solution.
9 years 4 months ago
9 years 4 months ago by Rutger Koperdraad. Reason: Spellign errors
I had a look at at your definition and it seems that all problems are due to a misunderstanding of the primary-key handling. Please, do the following:
1. Click "Edit data definition" in the Configuration tab and go to the last page (storage items).
2. Select the ClientName storage item on the left hand side (the settings will automatically be changed for the other storage items too).
3. Set the Primary key on the right hand side to CustomField2.
4. Click on Advanced options and select "Use primary key of selected name".
5. Click OK and then Finish to leave the wizard.
If you now print the card, CardExchange will store the RecordID of the "Nationale bibliotheekpas" database in the ReturnFile.CustomField2, while SQL Server will automatically generate a unique value for ReturnFile.id. It's compulsory to store the RecordID of the source database in the ReturnFile in order to maintain the reference between the two tables. You're free though to use another field than CustomField2.
Please, let me know whether this solves this long-running issue.
Senior Software Engineer
"A reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. All progress, therefore, depends on the unreasonable man." (Bernard Shaw)
9 years 4 months ago
9 years 4 months ago by Emiel.
I added an extra field and specified it as a primary key for the ReturnFile fields. Now it keeps on inserting records in the ReturnFile table and works the way I wanted. This is great. Thanks for this.