Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Problem Converting CSV to SQLite


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2007, 02:32 PM
Junior Member
 
Join Date: May 2007
Posts: 29
Default Problem Converting CSV to SQLite

Hi Erel,

I’m very new to SQL programming. I have used dzt’s program under ”Convert Any Database to SQLite(source & exe) to convert my CSV file to SQLite(.sl3) file.

After converting to SQLite file (test.sl3), its look very difference from your northwind.sl3 file.

Attached is my CUSTS2.CSV file. Can you help or any suggestions on ways to convert files?

Thanks
TC
Reply With Quote
  #2 (permalink)  
Old 10-31-2007, 02:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

You can use Connection.CreateSQLTable to convert your CSV file.
Using a Table control load the file with Table.LoadCSV.
Now export the table data to a SQL table using Connection.CreateSQLTable.
There is a small example here: http://www.basic4ppc.com/help/sql/index.html
Reply With Quote
  #3 (permalink)  
Old 10-31-2007, 03:08 PM
Junior Member
 
Join Date: May 2007
Posts: 29
Default

Tks Erel,
I used dzt's example and my sl3 file come up very difference. please see attached. Not sure I got is right?
Thanks.
Reply With Quote
  #4 (permalink)  
Old 10-31-2007, 03:40 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

This is not a valid SQLite database.
I recommend you to use Connection.CreateSQLTable.
Reply With Quote
  #5 (permalink)  
Old 10-31-2007, 06:57 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

I've tested your CSV with my example and it produces a valid SQlite database.

My example uses mainly Connection.CreateSQLTable, plus the VB6 program to produce the CSVs from databases
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #6 (permalink)  
Old 11-01-2007, 03:50 AM
Junior Member
 
Join Date: May 2007
Posts: 29
Default

Hi dtz,

Thank you for looking into my problem. Could you kindly give me an example (or codes) on how to use Connection.CreateSQLTable and export to .sl3 file.

Many thanks
TC
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQlite problem Ricky D Questions & Help Needed 3 10-04-2008 09:49 AM
Regarding SQLite problem mozaharul Questions & Help Needed 0 04-02-2008 10:28 AM
specifying datatypes when converting table to SQLite DB Steve Questions & Help Needed 1 06-14-2007 05:56 AM
Another sqlite problem! giannimaione Questions & Help Needed 5 05-13-2007 08:25 AM
Problem mit SQLite und CheckBox Fontanus German Forum 6 05-06-2007 04:03 PM


All times are GMT. The time now is 04:42 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0