[GRASS-user] sqlite database connection problems

Markus Neteler neteler at osgeo.org
Tue May 17 09:50:51 EDT 2011


On Tue, May 17, 2011 at 2:01 PM, Johannes Radinger <JRadinger at gmx.at> wrote:
> Hello,
>
> I tried to delete a vector file but I got following error:
>
> g.remove vect=river_gen at Cele
> Removing vector <river_gen at Cele>
> DBMI-SQLite driver error:
> Unable to open database: unable to open database file
> Unable to open database </Users/Johannes Radinger/Documents/GRASS-GIS/Cele_location/Cele/sqlite.db/> by driver <sqlite>

The trailing slash at sqlite.db/ should not be there.

...
> So i tried to list the the database connection and tables of my database and but there is that table existing:
>
> db.connect -p
> driver:sqlite
> database:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db/

sqlite.db is a file, with / triling GRASS may think that this indicates a
directory.

You need to define the DB link properly. That is in the VAR
file in the mapset (ASCII file) as well as in the dbln file of the
vector map - you can easily fix that with a text editor.
Be sure to avoid the trailing slash in future for the SQLite
backend, see manual of the grass-sqlite driver.

Markus


More information about the grass-user mailing list