[Loadstone] Interesting database tool

monty at loadstone-gps.com monty at loadstone-gps.com
Sun May 24 14:05:20 BST 2009


Hi Grzegorz,

Wow, this looks interesting and I'll have a look when I have a chance. 
We'll see if we can come up with something to make this work!

Thanks for finding this and sharing it too!

Monty


On Sun, 24 May 2009, Grzegorz Zlotowicz wrote:

> Hi all,
> yesterday i found an interesting PC tool, working in console of windows, called dbshell, which allows to edit and view a Symbian database...
> This tool would be rather interesting for developers, because it requires some basic knowledge of sql syntax to deal with a database, and in fact only one practical way of using it I can imagine is creating a binary Symbian databases for Loadstone on a pC...
> This tool is available on a website:
> http://garawaa.googlepages.com/
>
> I tried to use some more or less simple methods to automate a process of inserting data into a database using this tool, but standard methods of redirecting stdin from file didn't work, both using cmd commandline ("dbshell test.db <test.sql") and using a program which creates child process and makes pipe of stdin from a file...
> Possibility of automation this process would be great, especially for creating about 200 databases with hundreds of thousands of points, which i'm now creating in text form using written by me converter of Polish opensource map...
> But it implies time-consuming import of data manually by each user on his or her phone...
>
> One semi-automatic way of doing this import is:
> 1. Copy a created on phone empty ls database to dbshell folder, let's say, that this db is named test.db.
> 2. Execute dbshell test.db
> 3. Having an loadstone points text file convert it into a sql statements like:
> insert into point values ('name',500000000,200000000,0,0,0,3,123)
> and so on (i did this using written in 15 minutes simple conversion tool, no error checking of course...).
> Remark: quotes don't work, replace them with '.
> 4. Open this file with notepad, and mark all and copy to clipboard.
> 5. Goto dbshell window, press alt+space, select "edit" from the menu, then "paste"...
> 6. Go to an other window...
> 7. Wait for a process to complete from time to time checking a console window if there still are moving commands...
>
> I found out, that even in this way a process is relatively fast, importing about 30 thousands of points took no more than 20 minutes...
> but there is also one serious limitation - no utf8 characters are transmitted correctly into console using clipboard, so only way is to convert a file into plain ascii before import.
> Next limitation is maximum windows clipboard size, but maybe somebody points out an other than pipe redirection method of writing into console program running as child process... It would allow to automate whole thing...
>
> Greetings, Greg.


More information about the Loadstone mailing list