> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-vi-scada/datran-database-import-utility/troubleshooting/csv-import-fails.md).

# A CSV import fails and is rolled back

A CSV import stops with an error and its records are removed. Usually duplicate timestamps, a time that can't be read, or a bad digital value.

If there are any errors then the import is aborted and any database changes are rolled back. This puts the database into a known state and allows you to correct the problem and then re-import with the knowledge that duplicate database entries will not occur. All records imported from that CSV file are removed from the database.

{% hint style="info" %}
**Applies to:** Database Import Utility V1.x, CSV imports.
{% endhint %}

## Common causes

| Error                    | Fix                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Duplicate entry          | If the CSV file contains 2 or more identical timestamps then the import will fail due to a duplicate entry in the database. The DATRAN database operates at a resolution of 1 second and timestamps must be unique. |
| Time can't be read       | In the case of any errors, for example the time format cannot be parsed, the example data column will show the error in red.                                                                                        |
| Digital value not 0 or 1 | For digital points the only allowed values are 0 or 1.                                                                                                                                                              |

The **Status Report** area shows the progress of import along with any errors (displayed in red). This includes the names of the files being imported, how many rows have been imported and any errors that occurred during the import.

## Still not working? Contact QTech

Email <techsupport@qtech.co.nz> with the utility's version, the error log, the map file and the CSV file.
