Hi all:
I am trying to move to SQLite database from dbf using latest CVS (Mr. Moretti binaries, 30 May 06) on Mac 10.4.
I have not installed SQLite but am using the version embedded in Tiger 10.4 Is this sufficient?
I have successfully imported a small .shp file and viewed it with SQLite Database Browser.
db.connect works.
db.test returns all OK except for
RESULT: OK
select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2 and c1 ~ 'bc'
-SQLite driver error:
Error in sqlite3_prepare():select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2 and c1 ~ 'bc'
near "~": syntax error
EXECUTE: ******** ERROR ********
0a1
> abcd
RESULT: ******** ERROR ********
insert into grass_test1 values ( 3, 0.0, '_''_' )
EXECUTE: OK
I have a problem importing a points file with v.in.ascii. The import works well with dbf driver. When I change to SQLite driver (no other changes) I get the following error:
Length of column 3 (-1) is less than maximum value length (9)
I have specified column 3 as 'name1 varchar(30)' Is there a different syntax to specify character string variables in SQLite?
Thanks in advance for your help.
Dave
On Wed, 31 May 2006 18:44:46 -0600
Dave Kent <dkent@sasktel.net> wrote:
Hi all:
I am trying to move to SQLite database from dbf using latest CVS
(Mr. Moretti binaries, 30 May 06) on Mac 10.4.
I have not installed SQLite but am using the version embedded in
Tiger 10.4 Is this sufficient?
I have successfully imported a small .shp file and viewed it with
SQLite Database Browser.
db.connect works.
db.test returns all OK except for
RESULT: OK
select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2
and c1 ~ 'bc'
-SQLite driver error:
Error in sqlite3_prepare():select c1 from grass_test1 where
d1 < 500 / 2 and i1 <> 2 and c1 ~ 'bc'
near "~": syntax error
See: http://intevation.de/rt/webrt?serial_num=4056
Maybe this sheds some light.
I have a problem importing a points file with v.in.ascii. The
import works well with dbf driver. When I change to SQLite driver
(no other changes) I get the following error:
Length of column 3 (-1) is less than maximum value length (9)
I have specified column 3 as 'name1 varchar(30)' Is there a
different syntax to specify character string variables in SQLite?
Don't know.
But note sqlite might have issues with column types in general, eg.:
http://grass.itc.it/pipermail/grassuser/2006-May/034371.html.
Also note it could be VERY slow in some operations:
http://grass.itc.it/pipermail/grassuser/2006-February/032476.html
sqlite driver could be a really great stuff, only it needs polishing.
ANYBODY?
Maciek
--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/