[GRASS-dev] v.dissolve fails with sqlite driver

Markus Neteler neteler at itc.it
Tue May 15 14:42:32 EDT 2007


Hi,

so far the SQLite driver worked fine for me (after the various fixes) but it
fails
for v.dissolve with a problem which I don't understand:

# Spearfish, create new "sqlite" mapset:

db.connect driver=sqlite
database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db'
g.copy vect=quads at neteler,myquads --o
v.db.connect -p myquads

# add table with char column:
v.db.addtable myquads col="name varchar(10)"
# populate with something
v.db.update myquads col=name val="hello"
v.db.select myquads

# dissolved based on varchar column:
v.dissolve myquads out=myquads_diss col=name
...
DBMI-SQLite driver error:
Cannot step:
SQL logic error or missing database

ERROR: Cannot fetch dataa
...


Going into details:

g.gisenv set=DEBUG=3          
D3/3: db_start_driver_open_database():
  drvname = sqlite, dbname =
/home/neteler/grassdata/spearfish60/sqlite/sqlite.db
D2/3: opendir
/home/neteler/soft/63grass_cvsexp/dist.i686-pc-linux-gnu/driver/db/

D3/3:
db_driver_open_database()
D3/3: name = '/home/neteler/grassdata/spearfish60/sqlite/sqlite.db'
D2/3: name2 = '/home/neteler/grassdata/spearfish60/sqlite/sqlite.db'
D3/3:   SQL: SELECT cat, name FROM myquads ORDER BY name
D3/3: Escaped SQL: SELECT cat, name FROM myquads ORDER BY name
D3/3: describe_table()
D3/3: ncols = 2
D3/3: litetype = 1
D3/3: litetype = 3
D3/3: nkcols = 2
D3/3: litetype = 1
D2/3: col: cat, nkcols 0, litetype : 1, sqltype 3
D3/3: litetype = 3
D2/3: col: name, nkcols 1, litetype : 3, sqltype 13
D3/3:   2 rows selected
D3/3:   key type = 15
D3/3: execute: create table myquads_9293 (cat integer, name varchar(255))
D3/3: db__create_index()
D3/3:  SQL: create unique index myquads_9293_cat on myquads_9293 ( cat )
D3/3: fetch row = -1
DBMI-SQLite driver error:
Cannot step:
SQL logic error or missing database

ERROR: Cannot fetch data
D3/3: Mapset = sqlite
...

The problem is in db/drivers/sqlite/fetch.c
Any ideas?
thanks,
Makus
-- 
View this message in context: http://www.nabble.com/v.dissolve-fails-with-sqlite-driver-tf3760326.html#a10628682
Sent from the Grass - Dev mailing list archive at Nabble.com.




More information about the grass-dev mailing list