1. genweb
  2. RO CSVI
  3. Tuesday, 10 January 2017
  4.  Subscribe via email
Hi,
I'm using CSVI 7 and I'm trying to import an xml file into a custom table, but no rows are inserted.
The sample file to import is this:

<?xml version="1.0"?>
<ALLRECORDSDATASET>
<RECORD>
<FDI_T008>0001</FDI_T008>
<FDI_T009>A.C. INTER xxxxx</FDI_T009>
<FDI_T013>VIA CENISIO xxxx</FDI_T013>
<FDI_T014>20154</FDI_T014>
<FDI_T015>MILANO</FDI_T015>
<FDI_T016>MI</FDI_T016>
<FDI_T017>02-xxxxxx</FDI_T017>
<FDI_T018>02-xxxxxxx</FDI_T018>
<FDI_T022>0</FDI_T022>
<FDI_T030>0</FDI_T030>
<FDI_T036>N</FDI_T036>
<FDI_T037>1900-01-01</FDI_T037>
<FDI_T038>1900-01-01</FDI_T038>
<FDI_T040>IT</FDI_T040>
<FDI_T041>000000</FDI_T041>
</RECORD>
</ALLRECORDSDATASET>


The custom table structure is:

CREATE TABLE an6ef_TS019 (id int PRIMARY KEY, FDI_T008 VARCHAR(4), FDI_T009 VARCHAR(30), FDI_T010 VARCHAR(16), FDI_T011 VARCHAR(50), FDI_T012 VARCHAR(25), FDI_T013 VARCHAR(30), FDI_T014 NUMERIC(5,0), FDI_T015 VARCHAR(25), FDI_T016 VARCHAR(2), FDI_T017 VARCHAR(15), FDI_T018 VARCHAR(15), FDI_T019 VARCHAR(30), FDI_T020 VARCHAR(25), FDI_T021 VARCHAR(30), FDI_T022 NUMERIC(5,0), FDI_T023 VARCHAR(25), FDI_T024 VARCHAR(2), FDI_T025 VARCHAR(15), FDI_T026 VARCHAR(15), FDI_T027 VARCHAR(30), FDI_T028 VARCHAR(25), FDI_T029 VARCHAR(30), FDI_T030 NUMERIC(5,0), FDI_T031 VARCHAR(25), FDI_T032 VARCHAR(2), FDI_T033 VARCHAR(15), FDI_T034 VARCHAR(15), FDI_T035 VARCHAR(30), FDI_T036 VARCHAR(1), FDI_T037 DATE, FDI_T038 DATE, FDI_T039 VARCHAR(1), FDI_T040 VARCHAR(3), FDI_T041 VARCHAR(6))



I created a template with the field "Import based on" = FDI_T008, which is the record identifier, but it inserts nothing.
I attach the template and the log files.

Thank You!
Accepted Answer Pending Moderation
Hello,
You have a value for FDI_T008 field in your XML and so CSVI is trying to update the row. If there is a value set for import based on field in import file then it says CSVI that there is already an entry in database with this value and so update it. To have new rows inserted you need to leave FDI_T008 field empty. Try it and let me know.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!