[GRASS-dev] Re: [GRASS-user] Error while creating vectorial file in WinGRASS

Markus Metz markus.metz.giswork at googlemail.com
Wed Aug 4 04:02:36 EDT 2010


Hamish wrote:
> Hamish wrote:
>> You need to run db.connect to select a database backend to
>> use first. (There is no VAR file in the mapset yet)
>
> hopefully fixed & ready for testing in 6.5svn r42988 (v.edit).
>
>
> devs:
>  maybe do this for 'v.in.ascii -e' and 'v.digit -n' too?
>  or move this into Vect_open_new() ?

Not to Vect_open_new(), a GRASS vector does not need to have a DB
connection, this is optional.

Markus M


... but I'm not totally
> convinced that's the right place for it either; the mapset may
> come from an earlier version of GRASS. perhaps db.execute
> instead of exiting with an error.
>
>
> #include <grass/dbmi.h>
> ...
>  if (! db_get_default_driver_name() ) {
>      G_message(_("Creating new DB connection based on default mapset settings..."));
>      db_set_default_connection();
>  }
>
>
> see bug #7  http://trac.osgeo.org/grass/ticket/7
>
>
> Hamish
>
>
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-dev mailing list