[GRASSLIST:3748] db.execute

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/disen/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

dbmi: Protocol error
WARNING: Error while executing: "create table test_table ("cat" int, "desc"
         text)
         "
dbmi: Protocol error

also db.driver fails with the error:
error: can't read "opttype(1)": no such element in array
...

any help appreciated

Thanks dani

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 db.driver fails with the error:
error: can't read "opttype(1)": no such element in array

db.drivers -p ? Command line or GUI?

Radim

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

On Saturday 26 June 2004 20:45, Markus Neteler wrote:

> > 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))
         "

'desc' is SQL reserved key word.

Radim

Hi list,
our project works on the development of collaboration concepts for simulation application (having as their free variable mainly time) and GIS (i use GRASS5.7 for this). I want to analyze the capabilities of GML3.0 to transport spatiotemporal data between the components (including storing it).
I played around with v.out.ogr exporting gml2.0 files, looked a little bit in the code to estimate the possibility to copy and extend this solution to generate gml3.0- files (but I felt a little bit lost seeing its complexity (:frowning: ).

The question is now:
- does anybody have any experiences with this? maybe even with writing/reading GML3.0?
- any suggestion which way to take? Maybe also solutions which are not so elegant like existing for generating GML2.0

I know that this is maybe rather a gdal/OGR question, but i want to hear your opinion or experiences about this topic or problem.

Thanks Dani