Trust ID PBCEX logo 300x102

CSV Storage Error

10 years 8 months ago
richardbeal
Fresh Boarder
Fresh Boarder
Posts: 9
More
Topic Author
CSV Storage Error #346
I get this error message when printing.
[attachment=2:2z8y44t9]<!-- ia2 -->Image2.jpg<!-- ia2 -->[/attachment:2z8y44t9]

I'm tryimg to write to a csv file (for the Salto system to use )
[attachment=1:2z8y44t9]<!-- ia1 -->Image5.jpg<!-- ia1 -->[/attachment:2z8y44t9]
[attachment=0:2z8y44t9]<!-- ia0 -->Image6.jpg<!-- ia0 -->[/attachment:2z8y44t9]

The csv file contains a header and should contain data similar to this when Card Exchange writes to it:
Action,ID,Title,FirstNames,Surname,GroupID,ROMcode
3,011,Mr,Rich,Beal,01,A1234B

What does this error message tell me ? What am I doing wrong ?
Ideally I would like CE to write a new file each time something is printed (salto will delete this file once processed). Is that possible ?


Richard
Attachments:
10 years 8 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
CSV Storage Error #349
Hi Richard,

There is one big limitation to the use of CSV files: these files only allow for adding new records and it is not possible to update existing ones. That means that you have to be careful when defining storage items for CSV.

If you are using a CSV file to read your cardholder information from and after printing you want to update a specific field in that file, for example the field that contains the chip serial number, that is not possible, because it is an update action and not an insert action.

If you want to store data in a CSV file different from the one you're getting your cardholder data from, it is possible, but you can only do insert. If you specify in the storage item definition using the Advanced button that the records should always be inserted, you can store as many records as you want for the same person, and possibly create duplicate records. If not, you can only store a record once and will get an error message when you try to upgrade.

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)
10 years 8 months ago
richardbeal
Fresh Boarder
Fresh Boarder
Posts: 9
More
Topic Author
CSV Storage Error #350
Hi Rutger,
I've found the reason why I got the error message. This was due to entering the primary key twice.

[attachment=0:2hfnvojx]<!-- ia0 -->Image3.jpg<!-- ia0 -->[/attachment:2hfnvojx]

This is what it should look like:

[attachment=1:2hfnvojx]<!-- ia1 -->Image2.jpg<!-- ia1 -->[/attachment:2hfnvojx]

thanks


Richard
Attachments:
10 years 8 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
More
CSV Storage Error #352
Hi Richard,

Great! This is a classic mistake. You should never define a storage item for the primary key, as the primary key is always stored for an insert and never upgraded. Sorry that I didn't think about that in my previous post.

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.