So, I have no idea what to try anymore, but this is the problem I am facing at the moment:
I have a C# WPF application that imports a .csv file from the server, reads it and then uploads it into SQLite, since adding a new table I'm facing some issues with 2 columns, both numeric and containing between 8 and 10 digits. The cells that contain 8 and 9 digits have no problem, but when I try to upload 10 digits I get a blank cell in SQLite.
The most annoying about this is that there is no error message. I've tried to save into SQLite as numeric, integer, text, ... Nothing seems to work here.
This is my code after the .csv file is opened:
//The code before this part is basically using Jet.OleDb, connect to the file and create a DataSet and DataTable, these contain the right values
DataSet ds = new DataSet("CSVFile");
adapter.Fill(ds);
var dt = ds.Tables[0];
foreach (DataRow dr in dt.Rows) {
var eDel = dr[(0)].ToString();
var eRef = dr[(1)].ToString();
cmd.CommandText = "INSERT INTO delInc (DELIVERY,REFERENCEDOC) VALUES (@cDel,@cRef)";
cmd.Parameters.AddWithValue("@cDel", eDel);
cmd.Parameters.AddWithValue("@cRef", eRef);
}
cmd.ExecuteNonQuery();
In my .csv file I have:
DELIVERY | REFERENCEDOC
121859657 | 59151654
121859658 | 59183792
8185619953 | 7719802361
8185619954 | 380184551
But, in SQLite I only see:
DELIVERY | REFERENCEDOC
121859657 | 59151654
121859658 | 59183792
|
| 380184551
This is my DDL:
CREATE TABLE delInc
(
DELIVERY NUMERIC,
REFERENCEDOC NUMERIC
);
As I said before, I also tried it with TEXT and INTEGER, both don't work.