<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.5726" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2>yesterday i found an interesting PC tool, working
in console of windows, called dbshell, which allows to edit and view a Symbian
database...</FONT></DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2>This tool is available on a website:</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="http://garawaa.googlepages.com/">http://garawaa.googlepages.com/</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2>But it implies time-consuming import of data
manually by each user on his or her phone...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>One semi-automatic way of doing this import
is:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Copy a created on phone empty ls database to
dbshell folder, let's say, that this db is named test.db.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Execute dbshell test.db</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Having an loadstone points text file convert it
into a sql statements like:</FONT></DIV>
<DIV><FONT face=Arial size=2>insert into point values
('name',500000000,200000000,0,0,0,3,123)</FONT></DIV>
<DIV><FONT face=Arial size=2>and so on (i did this using written in 15 minutes
simple conversion tool, no error checking of course...).</FONT></DIV>
<DIV><FONT face=Arial size=2>Remark: quotes don't work, replace them with
'.</FONT></DIV>
<DIV><FONT face=Arial size=2>4. Open this file with notepad, and mark all and
copy to clipboard.</FONT></DIV>
<DIV><FONT face=Arial size=2>5. Goto dbshell window, press alt+space, select
"edit" from the menu, then "paste"...</FONT></DIV>
<DIV><FONT face=Arial size=2>6. Go to an other window...</FONT></DIV>
<DIV><FONT face=Arial size=2>7. Wait for a process to complete from time to time
checking a console window if there still are moving commands...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Greetings, Greg.</FONT></DIV></BODY></HTML>