Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5

Thread: SQLite dump

  1. #1
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020

    SQLite dump

    Hi,

    Does anyone have SQLite AMS snippets on:

    1. Dump SQLite data to a CSV or .txt
    2. Get CSV or .txt to SQLite.

    Thanks

  2. #2
    Join Date
    Dec 2003
    Posts
    891
    Do you have the sqlite browser?
    if not, go HERE and get the 1.1 version. I believe it is the 1.1 version of sqlite that is being used in AMS.
    This can inport and export csv/txt.

  3. #3
    Join Date
    Jun 2005
    Location
    Germany
    Posts
    74
    hi,

    for csv to sql you can look here http://www.indigorose.com/forums/showthread.php?t=9832
    helped me alot too.

    for export sql to csv you can use something like this

    Code:
    --perform the query
    local tbResults = SQLite.QueryToTable(db, "SELECT Name, Street, Zip, City FROM adressen");
    
    --build the first line in csv
    strCSV = "Name;Street;Zip;City\r\n";
    
    --add one line for each record in db
    for nRow = 1, tbResults2.Rows do
         strCSV = strCSV..tbResults2.Data[nRow]["Name"]..";"..tbResults2.Data[nRow]["Street"]..";"..tbResults2.Data[nRow]["Zip"]..";"..tbResults2.Data[nRow]["City"].."\r\n";
    end
    
    --write textfile to disk
    TextFile.WriteFromString(_SourceFolder.."\\Autoplay\\Docs\\", strCSV, false);
    byte

  4. #4
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020

    Excellent !!!

    Quote Originally Posted by Roboblue
    Do you have the sqlite browser?
    if not, go HERE and get the 1.1 version. I believe it is the 1.1 version of sqlite that is being used in AMS.
    This can inport and export csv/txt.
    Hi,

    This is an excellent SQLite Browser. No install required at all, which is fantastic.

    Now I have 2 choices:

    1. Include this SQL browser in the AMS app, to
    > to backup data
    > to dump into SQL format in order to load in MYSQL over the net
    > to dump in CSV in to order to load intoOpenOffice and MS Excel

    2. Learn how SQLite Browser dump data, so that I can use the codes and include it in AMS. Thus no longer need SQLite browser to do choice 1.

    Thanks Robo!!!

  5. #5
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020

    Thanks !!!!

    Quote Originally Posted by Byte
    hi,

    for csv to sql you can look here http://www.indigorose.com/forums/showthread.php?t=9832
    helped me alot too.

    for export sql to csv you can use something like this

    Code:
    --perform the query
    local tbResults = SQLite.QueryToTable(db, "SELECT Name, Street, Zip, City FROM adressen");
    
    --build the first line in csv
    strCSV = "Name;Street;Zip;City\r\n";
    
    --add one line for each record in db
    for nRow = 1, tbResults2.Rows do
         strCSV = strCSV..tbResults2.Data[nRow]["Name"]..";"..tbResults2.Data[nRow]["Street"]..";"..tbResults2.Data[nRow]["Zip"]..";"..tbResults2.Data[nRow]["City"].."\r\n";
    end
    
    --write textfile to disk
    TextFile.WriteFromString(_SourceFolder.."\\Autoplay\\Docs\\", strCSV, false);
    byte

    Danke vielmal, Byte !!

    This helps me to figure out the logic of the dump operations. woo hooo !!!

    Thanks again.

Similar Threads

  1. SQLite Database Browser - New Version!
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 9
    Last Post: 11-10-2009, 06:14 AM
  2. SQLite database in MEMORY only!
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 10-23-2009, 07:49 PM
  3. How to convert access database to sqlite database.
    By sside in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 07-22-2008, 07:44 PM
  4. SQLite Command Question (DELETE ROW)...
    By Intrigued in forum AutoPlay Media Studio 5.0
    Replies: 15
    Last Post: 12-08-2006, 11:17 AM
  5. Spotlight: SQLite Actions Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 03-12-2004, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts