Re: [sqlite] Insert into with Id...

2017-01-22 Thread hfiandor
Thanks very much, in special to Mr. Slavin.

Saludos
Ing. Héctor F. Fiandor Rosario

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert into with Id...

2017-01-15 Thread hfiandor
Dear Mr. Simon:

Today, early in the morning, I have reviewed the former ExcelToSQLite.exe and 
try to  run it  with data from my last application. I have corrected some 
mistakes and pretty work.

I thought my problems was solved.

Thanks very much,

Ing. Héctor F. Fiandor Rosario

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert into with Id...

2017-01-14 Thread Kees Nuyt

Dear Héctor, 

On Fri, 13 Jan 2017 21:38:04 -0500, "hfiandor"
 wrote:

> I have implemented the lectura of a csv file in my program as
> "import". I have followed yours instructions (the last one and
> others previous) . Thanks for your instructions.
> 
> The program works fine with csv files of one or two rows, but
> when I try to read a file with 9 rows, it fails.

In what way does it fail?
Does it fail silently or are there any error messages?
After the failure, are there any rows inserted, or none at all?
Does the program check and interpret the status of each sqlite
API call?
 
> I have reviewed the routines and not found the errors.
> 
> Please, I suspect that I have missed something. If you have
> any suggestion, I will appreciate very much.
> 
> If you need the procedure "import" I can send to you.

That depends on the answers to my questions above.

> Thanks in advance,
> 
> Ing. Héctor F. Fiandor Rosario

Hope this helps,

-- 
Regards,
Kees Nuyt

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert into with Id...

2017-01-13 Thread hfiandor
Dear Mr. Simon Slavin:

I have implemented the lectura of a csv file in my program as "import". I have 
followed yours instructions (the last one and others previous) . Thanks for 
your instructions.

The program works fine with csv files of one or two rows, but when I try to 
read a file with 9 rows, it fails.

I have reviewed the routines and not found the errors.

Please, I suspect that I have missed something. If you have any suggestion, I 
will appreciate very much.

If you need the procedure "import" I can send to you.

Thanks in advance,

Ing. Héctor F. Fiandor Rosario

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert into with Id...

2017-01-12 Thread Simon Slavin

On 12 Jan 2017, at 4:06am, hfiandor  wrote:

> I’m trying to read a .csv file and introduce in an SQLite table, using the
> insert into command.
> 
> 
> 
> In the .csv file I have not used this Id field (it was defined as integer
> and autoincrease).

Specify the fields you need in the INSERT command.  So instead of

INSERT INTO MyTable VALUES ('a','b','c')

you should do

INSERT INTO MyTable (name, address, phone) VALUES ('a','b','c')

If you do this, you can miss out the Id field.  When you do that, SQL makes up 
its own values for the Id field based on the INTEGER AUTOINCREMENT you 
specified.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users