1. Sid Price
  2. Valentina Database ADK
  3. Wednesday, August 31 2016, 04:17 PM
  4.  Subscribe via email
It appears that if a CSV file has blank lines at the end of it the ADK method "Import" places a record into the database. For example with this CSV file:

"fldID","fldName"
1,"Sig_1_30"
2,"Sig_2_30"
3,"Sig_3_30"
<- blank line
<-

I get the following into my table:

fldID fldName
1 Sig_1_30
2 Sig_2_30
3 Sig_3_30
0

Sid
Comment
There are no comments made yet.
Sid Price Accepted Answer
You already described how to enter an empty row, simply put "\t\t\n" or ",,\n" in the file. A line that is just "\n" is not a blank row, even by your definition.

This explicitly defines a blank row, just a "\n" does not.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
Sid,

they are not Bad data.

Image that somebody want insert such empty rows.
We should not close way for such wish.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Sid Price Accepted Answer
The file was generated by me, by hand in a text editor. Yes I made a mistake, however software should "degrade gracefully" under error conditions and NOT generate bad data into the database.
This was at the end of the file, I also believe that regardless of where it occurs an empty line should be skipped and not place bad data into the database.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ruslan Zasukhin Accepted Answer
1) okay let be coma

,, this is NULL value for a field.


2) well, this is how it works now...
And input file should follow strictly to required format.


* Do you have only one such empty line at the end of file?
* Where from this file comes? I mean it is generated by some other app?
I think we are able eat files from different sources.
So I wonder, where from this one?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Sid Price Accepted Answer
I must disagree here.

First the delimeter is "," and not "\t".
Second when the line has ONLY "\n" there are no fields defined AT ALL, so the "\t\t" or ",," pattern is not present either. An empty line should not generate records in the database.

What is in the CSV file is:
"fldID","fldName"
1,"Sig_1_30\n"
2,"Sig_2_30\n"
3,"Sig_3_30\n"
\n
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Ruslan Zasukhin Accepted Answer
well, this is logical

\t\t this is NULL value for a field.
\n this is one more row into table
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories