[GRASSLIST:3752] Re: db.execute

Markus Neteler neteler at itc.it
Sat Jun 26 14:45:39 EDT 2004


On Fri, Jun 25, 2004 at 06:01:53PM +0200, Radim Blazek wrote:
> On Friday 25 June 2004 17:43, Daniel Isenegger wrote:
> > Hi
> > i'm working on a suse 8.2 with grass57 (compiled from source) on a local
> > Grass-DB:
> >
> > with:
> > db.connect -p
> > driver:dbf
> > database:/data/gis/nfp48/nfp48/ipodlas0.1/grass/grassdata/UpperEngadine/dis
> >en/dbf
> >
> > db.select-statement works well
> > (echo "select defoliatio from defoliation_53_shp" | db.select)
> >
> > but db.execute statements fail, e.g.:
> > echo 'create table test_table ("cat" int, "desc" text)' | db.execute
> 
> 'text' is not supported by DBF, column names should not be quoted, try
> echo 'create table test_table (cat int, desc varchar(50))' | db.execute

Also this suggestion fails (also the command given in the man page):

echo 'create table test_table (cat int, desc varchar(50))' | db.execute
DBMI-Postgres driver error:
Cannot execute:
create table test_table (cat int, desc varchar(50))

ERROR:  parser: parse error at or near "desc" at character 35
WARNING: Error while executing: "create table test_table (cat int, desc
         varchar(50))
         "

(here: PG driver)

I don't know how to debug it...
 
> > also db.driver fails with the error:
> > error: can't read "opttype(1)": no such element in array
> 
> db.drivers -p ? Command line or GUI? 

The GUI version gives that error.

Markus
 




More information about the grass-user mailing list