[GRASS-dev] [GRASS GIS] #2147: db.databases not working in GRASS 7

GRASS GIS trac at osgeo.org
Sun Dec 22 12:46:31 PST 2013


#2147: db.databases not working in GRASS 7
----------------------------------+-----------------------------------------
 Reporter:  cmbarton              |       Owner:  grass-dev@…              
     Type:  defect                |      Status:  new                      
 Priority:  normal                |   Milestone:  7.0.0                    
Component:  Database              |     Version:  svn-trunk                
 Keywords:  db.databases, sqlite  |    Platform:  All                      
      Cpu:  OSX/Intel             |  
----------------------------------+-----------------------------------------

Comment(by martinl):

 Replying to [comment:4 neteler]:

 {{{
 > GRASS 7.0.svn (nc_spm_08):~ > db.databases
 > D1/1: db_d_init_error(): DBF
 > dbmi: db_list_databases() not implemented
 > dbmi: db_list_databases() not implemented
 > ERROR: Unable to list databases
 >
 > GRASS 7.0.svn (nc_spm_08):~ > db.connect -p
 > driver: dbf
 > database: /home/neteler/grassdata/nc_spm_08/user1/dbf/
 > schema:
 > group:
 }}}

 This is OK. DBF driver has no implemented function to list databases.

 {{{
 > GRASS 7.0.svn (nc_spm_08):~ > db.connect -d
 > D1/1: Creating new default DB params with db_set_default_connection()
 > Default driver / database set to:
 > driver: sqlite
 > database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
 >
 > GRASS 7.0.svn (nc_spm_08):~ > db.connect -p
 > driver: sqlite
 > database: /home/neteler/grassdata/nc_spm_08/user1/sqlite/sqlite.db
 > schema:
 > group:
 >
 > GRASS 7.0.svn (nc_spm_08):~ > db.databases
 > D1/1: db_d_init_error(): SQLite
 > D1/1: db count = 0
 > No databases found
 }}}

 The command
 {{{
 db.connect -d
 D1/1: Creating new default DB params with db_set_default_connection()
 Default driver / database set to:
 driver: sqlite
 database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
 }}}

 doesn't create database, so `db.databases` doesn't list any database. You
 need to run command which writes attribute data to the database.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2147#comment:5>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list