help to convert a csv file to a sqlite table.

mozaharul

Active Member
Licensed User
Hi,

To convert a csv file to sqlile I did :

1. initialize a new connection in the App_start (con.New1)

2. "table1" has been populated from a csv file and shows rows.

3. in the click event of a button used : con.CreateSQLTable("table1","rew")

but generating error :

"con.CreateSQLTable("table1","rew")
Error description
operation is not valid due to the current state of the object.
continue ?"

off course I have done mistake, pl. correct me.

regards,
 

N1c0_ds

Active Member
Licensed User
I made an application just for that.
Make sure the first row of your CSV file is the column names.

EDIT:Oh and the table created is a ".gdb" file and that the table name is "Main". I posted the source so you can edit it yourself.
 

Attachments

Last edited:

mozaharul

Active Member
Licensed User
Hi N1c0_ds,

Thanks and I appreciate for your help. The small mistake I was doing, your code helped me to correct it.


best regards,
 

Filippo

Expert
Licensed User
CSVtoSQL with Listview.dll

Hi mozaharul,

here are a simpler example with Listview.dll. ;)


Ciao,
Filippo
 

Attachments

Top