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/dbfdb.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...
Hi
hm, somehow strange:
create table test_landcover (cat int, desc varchar(30))
works.
but further operations fail, like (tried this with several variations of quotations and escape-chars):
GRASS 5.7.cvs > echo 'insert into test_landcover values ('1', 'forest')' | db.execute
DBMI-DBF driver error:
SQL parser error in statement:
insert into test_landcover values (1, forest)
Error in db_execute_immediate()
WARNING: Error while executing: "insert into test_landcover values (1,
forest)
"
or on a existing table:
echo 'ALTER TABLE defoliation_53_shp ADD GRASSRGB varchar(30)' | db.execute
dbmi: Protocol error
WARNING: Error while executing: "ALTER TABLE defoliation_53_shp ADD
GRASSRGB varchar(30)
"
Broken pipe
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
exactly: on the GUI it fails. On the command line, this is fine.
db.drivers -p
dbf
shp
odbc
pg
ogr
Dani
------------------------------------------------------------------------