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

Kim:

- Error in command execution db.executeExecution failed:
'db.execute --q'Details: Error: Unable to start driver <(null)>

but I'm not sure why the wxGUI is calling db.execute in this case
at all. a vector map does not need a table.

?,
Hamish

Hi,

2010/8/4 Hamish <hamish_b@yahoo.com>:

Kim:

- Error in command execution db.executeExecution failed:
'db.execute --q'Details: Error: Unable to start driver <(null)>

but I'm not sure why the wxGUI is calling db.execute in this case
at all. a vector map does not need a table.

db.execute (and v.db.connect) is called only when user asks for
creating attribute table in the dialog (checkbox)

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin wrote:

db.execute (and v.db.connect) is called only when user asks
for creating attribute table in the dialog (checkbox)

ok, so the checkbox should run 'db.connect -p' and see if a DB exists, if
it doesn't create one.

proposal: add a new 'db.connect -d' flag to (re)set up the connection to
the default (like g.region has) to make this easier.

Hamish

Hi,

2010/8/4 Hamish <hamish_b@yahoo.com>:

Martin wrote:

db.execute (and v.db.connect) is called only when user asks
for creating attribute table in the dialog (checkbox)

ok, so the checkbox should run 'db.connect -p' and see if a DB exists, if
it doesn't create one.

proposal: add a new 'db.connect -d' flag to (re)set up the connection to
the default (like g.region has) to make this easier.

done in r42993. After review could be backported to devbr6.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Hi,

2010/8/4 Hamish <hamish_b@yahoo.com>:

Martin wrote:

db.execute (and v.db.connect) is called only when user asks
for creating attribute table in the dialog (checkbox)

ok, so the checkbox should run 'db.connect -p' and see if a DB exists, if
it doesn't create one.

fixed by `db.connect -c` in r42994 and backported to all active branches.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Martin wrote:

>> db.execute (and v.db.connect) is called only when user asks
>> for creating attribute table in the dialog (checkbox)

Hamish:

> ok, so the checkbox should run 'db.connect -p' and see if a DB exists,
> if it doesn't create one.
>
> proposal: add a new 'db.connect -d' flag to (re)set up the connection
> to the default (like g.region has) to make this easier.

Martin:

done in r42993. After review could be backported to devbr6.

oops, I totally overlooked the existing -c flag.
(nothing wrong with the new -d flag, but not as much need to backport it)

for 6.4 I think the solution is to have the 'create new vector map' in
wxgui (with the create-table checkbox enabled) do the python equivalent of:

DB=`db.connect -p | grep '^driver:' | cut -f2 -d:`
if [ -z "$DB" ] ; then
   db.connect -c
fi

cheers,
Hamish

Martin wrote:

fixed by `db.connect -c` in r42994 and backported to all active branches.

nevermind, you're a step ahead of me..

Hamish