Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) 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
Knows the basics
 
Join Date: May 2007
Posts: 58
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: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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
Knows the basics
 
Join Date: May 2007
Posts: 58
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: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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: Ioannina, Greece
Posts: 356
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
Knows the basics
 
Join Date: May 2007
Posts: 58
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQlite problem Ricky D Questions (Windows Mobile) 1 10-04-2008 09:35 AM
Regarding SQLite problem mozaharul Questions (Windows Mobile) 0 04-02-2008 10:28 AM
specifying datatypes when converting table to SQLite DB Steve Questions (Windows Mobile) 1 06-14-2007 05:56 AM
Another sqlite problem! giannimaione Questions (Windows Mobile) 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:06 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0