Trust ID PBCEX logo 300x102

Multiple Database connections to one card layout

11 years 1 day ago
Audra
Moderator
Moderator
Posts: 51
More
Topic Author
Multiple Database connections to one card layout #224
Hi.
If I want to create one card layout that has 5 different variable object/fields, can each of those object/fields be connected to 5 different databases? I have an application where one variable field has data coming from the HRM software, the other field has variable data coming from the security software, the other field has variable data coming from a payment software, etc.

If yes, would I just do this in the mappings section for each variable field?

If yes, is there a limit to how many database connections can be connected into one card layout?

Audra
cardexchangesolutions.com
11 years 1 day ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Multiple Database connections to one card layout #226
Hi Audra,

If you configure your data definition to read data from multiple databases, all the data becomes available in the mappings window. For each variable that appears in the Visible Items of the mappings window, you can select the Database Column mapping type and then one of the available database columns. Each database-field name in the drop-down box mentions between parenthesis which database it is from.

There is no CardExchange limit as to how many databases you can link in a single data definition. However, you have to take into account that you should be able to relate records in one database to records in another database. This is done by means of the primary key. All linked databases should have a primary key field that contains the same value if the record is for the same person. Imagine that I have a HRM database and that the primary key is called EMPID, while there is also an access control database with a primary key called Id. If the record with data for John Smith in the HRM database has EMPID=678, then the recod with data for John Smith in the access control database should have Id=678. Otherwise it would be impossible to connect the to records with each other.

In practice, when linking to more than two databases, things tend to get very complicated and it is wiser to look for a software solution that maintains the relevant data in a single database. Such a solution could be a card management system, but also a synchronization routine that fills a database dedicated to ID-card printing.

Rutger Koperdraad
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)
6 years 2 months ago
Total ID Support
Junior Boarder
Junior Boarder
Posts: 21
More
Multiple Database connections to one card layout #3948
Hi Rutger,

It looks like this post may be a little outdated. We need to connect to a second database (an Excel file) which contains only the nicknames of the employees and their Employee number. They are currently connected to a Lawson DB which is "read-only". In order to solve the problem without getting the DBA involved, they have created an Excel file with the additional data.

They want the 'nickname", not the first and last name, to show up on the ID card. How do we go about doing this? I've added the second DB, selected the field from the second DB and placed it on the card design, but cannot get the data to show up on the ID card. There are no mappings available in the mappings window.

I know Brian (the other tech) was working on this also, and I don't know if he filled out a support ticket. If he has, please disregard this post, or maybe copy and paste your response so others can use the info.

Thanks.

Jeff
6 years 2 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
Multiple Database connections to one card layout #3950
Hi Jeff,

With CardExchange you can connect to two database by adding an extra database in the first page of the database-setup wizard. However, there are some limitation you need to take into account. First of all, one database is the principle one and the name list is filled using fields from this database. That means that you will only see records that exist in the principle database. Secondly, only the principle database can be edited in the database-edit window. Thirdly, records from the secondary database are linked to the principle one using the primary-key fields of both, which means that the primary keys should have coinciding values, like for example the employee ID.

In your case, if you want to be able edit the Excel file with nicknames, the Excel file needs to be the primary database. So if you want to print a card for a person that exists in the principle database but not yet in your Excel file, you first would have to insert a new record with the correct primary-key value before you can print.

In the mappings, you should see the fields of both databases. If that is not the case in your configuration, maybe you can send some screen shots of the configuration.

regards,
Rutger.

Rutger Koperdraad
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)
×

Notice

The forum is in read only mode.