Basic4ppc - Windows Mobile Development  

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

Code Samples & Tips Share your recent discoveries and ideas with other users.


How to convert an Access database to a sqlite database


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2007, 09:35 PM
Peter's Avatar
Junior Member
 
Join Date: May 2007
Location: The Netherlands
Posts: 18
Default How to convert an Access database to a sqlite database

First of all, this wisdom isn't mine. I found it on the internet when i wanted to convert an MS Access database. As this could be helpfull to other B4PPC users i will quote the text here. Thanks to SSIDE for the following text.

1-Export the access database into text files, semicolon or comma delimited.
2-Open the SQLite database browser version 1.1 and chose file->import->table from csv file. Browse for your text file and choose the proper delimiter. Click create.
3-Done.

I assume that you have already a access database and you have already created a sqlite database with the proper table. Before you import the text file (csv file) into sqlite you must open the sqlite database where you want to import the text file (csv file) to. If you have created no table then the opportunity will be given to create one or to use the first line of the text file (csv file) to create the fields (columns).

Another way to create sqlite database from access or from excel is to save each column into a text file. That means a table with 7 columns = 7 text files. Use TextFile.ReadToTable to read the contents of the 7 text files into tables and use the for loop to load them into a sqlite database.
There are other ways to convert access database or excel doc into sqlite database but i described 2 of them.
I have used similar ways to create sql databases but in some occassions you need a php script.


The SQLite database browser can be found at http://sqlitebrowser.sourceforge.net. The latest version is 1.3.

I've tried it and it works as a charm. Mind you, it can take a very long time to convert a large table.

Peter
__________________
PC : P4 3gHz, 512 MiB
PPC : Asus A600 + 1 GiB SD
---------------------------------------------------
(Reminder to self: )
Reply With Quote
  #2 (permalink)  
Old 05-20-2007, 11:24 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 Convert Access and MSSQL to SQLite

A better way is to download SQLite2007 Pro Enterprise Manager (freeware) from http://www.osenxpsuite.net/?xp=3

Dimitris

----------
Basic4ppc: best rad tool for Windows Mobile!

Last edited by dzt : 05-20-2007 at 11:26 PM.
Reply With Quote
  #3 (permalink)  
Old 05-21-2007, 08:18 AM
Peter's Avatar
Junior Member
 
Join Date: May 2007
Location: The Netherlands
Posts: 18
Default

Thank you, Dimitris. I'll try that.
The descrition i gave works, but i've found out that in some cases it takes a very, very, VERY long time to convert.


Peter
__________________
PC : P4 3gHz, 512 MiB
PPC : Asus A600 + 1 GiB SD
---------------------------------------------------
(Reminder to self: )
Reply With Quote
  #4 (permalink)  
Old 05-21-2007, 03:00 PM
Knows the basics
 
Join Date: Apr 2007
Location: Canari Islan
Posts: 70
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thank you for the address Dimitris

this is also free and it works well

http://sourceforge.net/projects/sqlitebrowser/

manu
Reply With Quote
  #5 (permalink)  
Old 07-24-2007, 10:53 AM
Newbie
 
Join Date: Jun 2007
Posts: 2
Default

The SQLite2007 Pro Enterprise Manager is not really freeware, since it limits the number of records to 100 (and is thatway probably useless for everybody). Without limitations you've got to pay.
Reply With Quote
  #6 (permalink)  
Old 07-24-2007, 04:20 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 JensPusch,

You are right. When I had posted the link it was realy freeware (at least as I remeber). Now it is not.

In the meantime I've made my own tool posted here
Convert Any Database to SQLite (source & exe)
which fits better in my needs.

Regards
__________________
Dimitris Zacharakis
http://www.terracom.gr
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
Graphic in SQLite Database Picard Questions & Help Needed 1 08-23-2008 12:03 PM
Date save as zero (0) in the SQLite database mozaharul Questions & Help Needed 2 04-02-2008 10:25 AM
Command to create a database in sqlite mozaharul Questions & Help Needed 5 03-30-2008 04:38 AM
Convert Any Database to SQLite (source & exe) dzt Code Samples & Tips 6 02-28-2008 08:39 AM
multiple connections to a sqlite database Peter Questions & Help Needed 5 05-13-2007 08:49 AM


All times are GMT. The time now is 10:12 PM.


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