Re: [sqlite] To import csv file in C#

2013-02-10 Thread Brad Hards

On 09/02/13 13:49, mukesh kumar mehta wrote:

Is there any option to import csv file into sqlite database with the
help of System.Data.Sqlite.dll. As like shell command ".import
file_name table_name".

SpatiaLite can do this (either as a virtual table, or an import). There
are probably other extensions that can do this too.


As like "bulk insert" which uses in sqlserver. As like "Load Data"
which uses in mysql.

This doesn't make as much sense in SQLite, because you'd be better off
just creating a new SQLite database and moving that around rather than
some dump format.

Brad

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


Re: [sqlite] To import csv file in C#

2013-02-09 Thread Simon Slavin

On 9 Feb 2013, at 2:49am, mukesh kumar mehta  wrote:

> Is there any option to import csv file into sqlite database with the help
> of System.Data.Sqlite.dll.
> As like shell command ".import file_name table_name".
> 
> As like "bulk insert" which uses in sqlserver.
> As like "Load Data" which uses in mysql.

The part of the Shell tool which understands CSV format is in the Shell Tool, 
not part of the SQLite library.

There is no part of SQLite which understands CSV format.  If you want to import 
from a CSV file, you will have to put your understanding of CSV format in your 
own code, or find some other external library.  But unless you have tricky 
quotes to handle, CSV format is very simple: separate lines with returns and 
separate columns with commas.  It shouldn't take long to write your own code.

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


[sqlite] To import csv file in C#

2013-02-09 Thread mukesh kumar mehta
Is there any option to import csv file into sqlite database with the help
of System.Data.Sqlite.dll.
As like shell command ".import file_name table_name".

As like "bulk insert" which uses in sqlserver.
As like "Load Data" which uses in mysql.


-- 
Thanks & Regards
Mukesh Kr. Mehta
Software Developer
Bonanza Portfolio Ltd.
Mob No:- 09311473211
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users